chrome/browser/web_resource/notification_promo.cc
// Returns a string suitable for the Promo Server URL 'osname' value.
Returns a string suitable for the Promo Server URL 'osname' value.
Returns a string suitable for the Promo Server URL ' osname ' value .
std::string PlatformString() {
#if defined(OS_WIN)
  return "win";
#elif defined(OS_IOS)
  const bool isTablet = false;
  return std::string("ios-") + (isTablet ? "tablet" : "phone");
#elif defined(OS_MACOSX)
  return "mac";
#elif defined(OS_CHROMEOS)
  return "chromeos";
#elif defined(OS_LINUX)
  return "linux";
#elif defined(OS_ANDROID)
  const bool isTablet =
      CommandLine::ForCurrentProcess()->HasSwitch(switches::kTabletUI);
  return std::string("android-") + (isTablet ? "tablet" : "phone");
#else
  return "none";
#endif
}
std :: string PlatformString ( ) { #if defined ( OS_WIN ) return " " ; #elif defined ( OS_IOS ) const bool isTablet = false ; return std :: string ( " " ) + ( isTablet ? " " : " " ) ; #elif defined ( OS_MACOSX ) return " " ; #elif defined ( OS_CHROMEOS ) return " " ; #elif defined ( OS_LINUX ) return " " ; #elif defined ( OS_ANDROID ) const bool isTablet = CommandLine :: ForCurrentProcess ( ) -> HasSwitch ( switches :: kTabletUI ) ; return std :: string ( " " ) + ( isTablet ? " " : " " ) ; #else return " " ; #endif }
Returns a string suitable for the Promo Server URL 'osname' value.
Returns a string suitable for the Promo Server URL ' osname ' value .
// TODO(noyau): add iOS-specific implementation