diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 05:03:53 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-17 05:03:53 +0000 |
commit | e68986669f5e8908bc94b7938ebdd572bf9094a7 (patch) | |
tree | cb52ff09f23d248919d7052531771cff52a09605 | |
parent | c980b7dfaaeae8511be4ea4ff5799787d10d019c (diff) | |
download | chromium_src-e68986669f5e8908bc94b7938ebdd572bf9094a7.zip chromium_src-e68986669f5e8908bc94b7938ebdd572bf9094a7.tar.gz chromium_src-e68986669f5e8908bc94b7938ebdd572bf9094a7.tar.bz2 |
Clean up Chrome OS WARNING spam
BUG=393266
For log only change to profile_io_data.cc (reviewed by mattm)
TBR=mmenke@chromium.org
Review URL: https://codereview.chromium.org/385993004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283648 0039d316-1c4b-4281-b951-d872f2087c98
14 files changed, 53 insertions, 58 deletions
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc index e2c5c0e..35c42bd 100644 --- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc +++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc @@ -146,9 +146,10 @@ scoped_ptr<base::DictionaryValue> ComponentExtensionIMEManagerImpl::GetManifest( LOG(ERROR) << "Failed at getting manifest"; if (!extension_l10n_util::LocalizeExtension(file_path, manifest.get(), - &error)) - LOG(ERROR) << "Localization failed"; - + &error)) { + LOG(ERROR) << "Localization failed for: " << file_path.value() + << " Error: " << error; + } return manifest.Pass(); } diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc index 1592f17..95241b4 100644 --- a/chrome/browser/chromeos/login/session/user_session_manager.cc +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc @@ -368,14 +368,14 @@ bool UserSessionManager::RespectLocalePreference( if (pref_locale.empty()) pref_locale = global_app_locale; DCHECK(!pref_locale.empty()); - LOG(WARNING) << "RespectLocalePreference: " - << "app_locale='" << pref_app_locale << "', " - << "bkup_locale='" << pref_bkup_locale << "', " - << (account_locale != NULL - ? (std::string("account_locale='") + (*account_locale) + - "'. ") - : (std::string("account_locale - unused. "))) - << " Selected '" << pref_locale << "'"; + VLOG(1) << "RespectLocalePreference: " + << "app_locale='" << pref_app_locale << "', " + << "bkup_locale='" << pref_bkup_locale << "', " + << (account_locale != NULL + ? (std::string("account_locale='") + (*account_locale) + + "'. ") + : (std::string("account_locale - unused. "))) + << " Selected '" << pref_locale << "'"; profile->ChangeAppLocale(pref_locale, Profile::APP_LOCALE_CHANGED_VIA_LOGIN); // Here we don't enable keyboard layouts for normal users. Input methods @@ -458,7 +458,7 @@ void UserSessionManager::OnNewRefreshTokenAvaiable(Profile* user_profile) { UserManager::Get()->GetLoggedInUser()->email(), User::OAUTH2_TOKEN_STATUS_VALID); - LOG(WARNING) << "Exiting after new refresh token fetched"; + VLOG(1) << "Exiting after new refresh token fetched"; // We need to restart cleanly in this case to make sure OAuth2 RT is actually // saved. diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc index 4e189b8..edd20df 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc +++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc @@ -100,10 +100,10 @@ void OAuth2LoginManager::RestoreSessionFromSavedTokens() { ProfileOAuth2TokenService* token_service = GetTokenService(); const std::string& primary_account_id = GetPrimaryAccountId(); if (token_service->RefreshTokenIsAvailable(primary_account_id)) { - LOG(WARNING) << "OAuth2 refresh token is already loaded."; + VLOG(1) << "OAuth2 refresh token is already loaded."; VerifySessionCookies(); } else { - LOG(WARNING) << "Loading OAuth2 refresh token from database."; + VLOG(1) << "Loading OAuth2 refresh token from database."; // Flag user with unknown token status in case there are no saved tokens // and OnRefreshTokenAvailable is not called. Flagging it here would @@ -128,7 +128,7 @@ bool OAuth2LoginManager::ShouldBlockTabLoading() { void OAuth2LoginManager::OnRefreshTokenAvailable( const std::string& account_id) { - LOG(WARNING) << "OnRefreshTokenAvailable"; + VLOG(1) << "OnRefreshTokenAvailable"; if (state_ == SESSION_RESTORE_NOT_STARTED) return; @@ -139,7 +139,7 @@ void OAuth2LoginManager::OnRefreshTokenAvailable( // Do not validate tokens for supervised users, as they don't actually have // oauth2 token. if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { - LOG(WARNING) << "Logged in as managed user, skip token validation."; + VLOG(1) << "Logged in as managed user, skip token validation."; return; } // Only restore session cookies for the primary account in the profile. diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc index d3567e5..0610d5b 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc @@ -388,11 +388,11 @@ LoginDisplayHostImpl::LoginDisplayHostImpl(const gfx::Rect& background_bounds) chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN, content::NotificationService::AllSources()); } - LOG(WARNING) << "Login WebUI >> " - << "zero_delay: " << zero_delay_enabled - << " wait_for_wp_load_: " << waiting_for_wallpaper_load_ - << " wait_for_pods_: " << waiting_for_user_pods_ - << " init_webui_hidden_: " << initialize_webui_hidden_; + VLOG(1) << "Login WebUI >> " + << "zero_delay: " << zero_delay_enabled + << " wait_for_wp_load_: " << waiting_for_wallpaper_load_ + << " wait_for_pods_: " << waiting_for_user_pods_ + << " init_webui_hidden_: " << initialize_webui_hidden_; media::SoundsManager* manager = media::SoundsManager::Get(); ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); @@ -529,10 +529,10 @@ void LoginDisplayHostImpl::StartWizard( is_showing_login_ = false; if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { - LOG(WARNING) << "Login WebUI >> wizard postponed"; + VLOG(1) << "Login WebUI >> wizard postponed"; return; } - LOG(WARNING) << "Login WebUI >> wizard"; + VLOG(1) << "Login WebUI >> wizard"; if (!login_window_) LoadURL(GURL(kOobeURL)); @@ -566,7 +566,7 @@ void LoginDisplayHostImpl::StartUserAdding( restore_path_ = RESTORE_ADD_USER_INTO_SESSION; completion_callback_ = completion_callback; finalize_animation_type_ = ANIMATION_NONE; - LOG(WARNING) << "Login WebUI >> user adding"; + VLOG(1) << "Login WebUI >> user adding"; if (!login_window_) LoadURL(GURL(kUserAddingURL)); // We should emit this signal only at login screen (after reboot or sign out). @@ -608,10 +608,10 @@ void LoginDisplayHostImpl::StartSignInScreen( PrewarmAuthentication(); if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { - LOG(WARNING) << "Login WebUI >> sign in postponed"; + VLOG(1) << "Login WebUI >> sign in postponed"; return; } - LOG(WARNING) << "Login WebUI >> sign in"; + VLOG(1) << "Login WebUI >> sign in"; if (!login_window_) { TRACE_EVENT_ASYNC_BEGIN0("ui", "ShowLoginWebUI", kShowLoginWebUIid); @@ -696,7 +696,7 @@ void LoginDisplayHostImpl::PrewarmAuthentication() { } void LoginDisplayHostImpl::StartDemoAppLaunch() { - LOG(WARNING) << "Login WebUI >> starting demo app."; + VLOG(1) << "Login WebUI >> starting demo app."; SetStatusAreaVisible(false); demo_app_launcher_.reset(new DemoAppLauncher()); @@ -705,7 +705,7 @@ void LoginDisplayHostImpl::StartDemoAppLaunch() { void LoginDisplayHostImpl::StartAppLaunch(const std::string& app_id, bool diagnostic_mode) { - LOG(WARNING) << "Login WebUI >> start app launch."; + VLOG(1) << "Login WebUI >> start app launch."; SetStatusAreaVisible(false); finalize_animation_type_ = ANIMATION_FADE_OUT; if (!login_window_) @@ -747,7 +747,7 @@ void LoginDisplayHostImpl::Observe( const content::NotificationSource& source, const content::NotificationDetails& details) { if (chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED == type) { - LOG(WARNING) << "Login WebUI >> wp animation done"; + VLOG(1) << "Login WebUI >> wp animation done"; is_wallpaper_loaded_ = true; ash::Shell::GetInstance()->user_wallpaper_delegate() ->OnWallpaperBootAnimationFinished(); @@ -766,7 +766,7 @@ void LoginDisplayHostImpl::Observe( content::NotificationService::AllSources()); } else if (chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE == type || chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN == type) { - LOG(WARNING) << "Login WebUI >> WEBUI_VISIBLE"; + VLOG(1) << "Login WebUI >> WEBUI_VISIBLE"; if (waiting_for_user_pods_ && initialize_webui_hidden_) { waiting_for_user_pods_ = false; ShowWebUI(); @@ -988,7 +988,7 @@ void LoginDisplayHostImpl::ShowWebUI() { NOTREACHED(); return; } - LOG(WARNING) << "Login WebUI >> Show already initialized UI"; + VLOG(1) << "Login WebUI >> Show already initialized UI"; login_window_->Show(); login_view_->GetWebContents()->Focus(); if (::switches::IsTextInputFocusManagerEnabled()) @@ -1011,7 +1011,7 @@ void LoginDisplayHostImpl::StartPostponedWebUI() { NOTREACHED(); return; } - LOG(WARNING) << "Login WebUI >> Init postponed WebUI"; + VLOG(1) << "Login WebUI >> Init postponed WebUI"; // Wallpaper has finished loading before StartWizard/StartSignInScreen has // been called. In general this should not happen. @@ -1084,10 +1084,10 @@ void LoginDisplayHostImpl::InitLoginWindowAndView() { // always show it. if (!initialize_webui_hidden_ || (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { - LOG(WARNING) << "Login WebUI >> show login wnd on create"; + VLOG(1) << "Login WebUI >> show login wnd on create"; login_window_->Show(); } else { - LOG(WARNING) << "Login WebUI >> login wnd is hidden on create"; + VLOG(1) << "Login WebUI >> login wnd is hidden on create"; login_view_->set_is_hidden(true); } login_window_->GetNativeView()->SetName("WebUILoginView"); diff --git a/chrome/browser/chromeos/login/ui/webui_login_view.cc b/chrome/browser/chromeos/login/ui/webui_login_view.cc index 957ac19..42febae 100644 --- a/chrome/browser/chromeos/login/ui/webui_login_view.cc +++ b/chrome/browser/chromeos/login/ui/webui_login_view.cc @@ -462,13 +462,12 @@ void WebUILoginView::DidFailProvisionalLoad( void WebUILoginView::OnLoginPromptVisible() { // If we're hidden than will generate this signal once we're shown. if (is_hidden_ || webui_visible_) { - LOG(WARNING) << "Login WebUI >> not emitting signal, hidden: " - << is_hidden_; + VLOG(1) << "Login WebUI >> not emitting signal, hidden: " << is_hidden_; return; } TRACE_EVENT0("chromeos", "WebUILoginView::OnLoginPromoptVisible"); if (should_emit_login_prompt_visible_) { - LOG(WARNING) << "Login WebUI >> login-prompt-visible"; + VLOG(1) << "Login WebUI >> login-prompt-visible"; chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> EmitLoginPromptVisible(); } diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index dcf3bcf..ead635a 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc @@ -367,6 +367,7 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { // user. if (user && !user->username_hash().empty()) { params->username_hash = user->username_hash(); + DCHECK(!params->username_hash.empty()); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(&StartNSSInitOnIOThread, @@ -375,8 +376,6 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) { profile->GetPath())); } } - if (params->username_hash.empty()) - LOG(WARNING) << "No username_hash; skipped NSS initialization."; #endif params->profile = profile; diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc index a811fff..9fdf9a5 100644 --- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc @@ -187,12 +187,11 @@ void GaiaScreenHandler::ReloadGaia() { return; NetworkStateInformer::State state = network_state_informer_->state(); if (state != NetworkStateInformer::ONLINE) { - LOG(WARNING) << "Skipping reloading of Gaia since " - << "network state=" - << NetworkStateInformer::StatusString(state); + VLOG(1) << "Skipping reloading of Gaia since network state=" + << NetworkStateInformer::StatusString(state); return; } - LOG(WARNING) << "Reloading Gaia."; + VLOG(1) << "Reloading Gaia."; frame_state_ = FRAME_STATE_LOADING; CallJS("doReload"); } @@ -497,7 +496,7 @@ void GaiaScreenHandler::ShowGaiaScreenIfReady() { } void GaiaScreenHandler::MaybePreloadAuthExtension() { - LOG(WARNING) << "MaybePreloadAuthExtension() call."; + VLOG(1) << "MaybePreloadAuthExtension() call."; // If cookies clearing was initiated or |dns_clear_task_running_| then auth // extension showing has already been initiated and preloading is senseless. diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index 33c647c..c9f8793 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc @@ -416,7 +416,7 @@ void SigninScreenHandler::SetNativeWindowDelegate( } void SigninScreenHandler::OnNetworkReady() { - LOG(WARNING) << "OnNetworkReady() call."; + VLOG(1) << "OnNetworkReady() call."; DCHECK(gaia_screen_handler_); gaia_screen_handler_->MaybePreloadAuthExtension(); } @@ -1156,8 +1156,8 @@ void SigninScreenHandler::HandleOpenProxySettings() { } void SigninScreenHandler::HandleLoginVisible(const std::string& source) { - LOG(WARNING) << "Login WebUI >> loginVisible, src: " << source << ", " - << "webui_visible_: " << webui_visible_; + VLOG(1) << "Login WebUI >> loginVisible, src: " << source << ", " + << "webui_visible_: " << webui_visible_; if (!webui_visible_) { // There might be multiple messages from OOBE UI so send notifications after // the first one only. diff --git a/chromeos/dbus/system_clock_client.cc b/chromeos/dbus/system_clock_client.cc index 199a6ac..366e9e4 100644 --- a/chromeos/dbus/system_clock_client.cc +++ b/chromeos/dbus/system_clock_client.cc @@ -93,7 +93,7 @@ class SystemClockClientImpl : public SystemClockClient { // Callback for CanSetTime method. void OnGetCanSet(dbus::Response* response) { if (!response) { - LOG(WARNING) << "CanSetTime request failed."; + VLOG(1) << "CanSetTime request failed."; return; } diff --git a/chromeos/system/name_value_pairs_parser.cc b/chromeos/system/name_value_pairs_parser.cc index 211cce7..0c779eb 100644 --- a/chromeos/system/name_value_pairs_parser.cc +++ b/chromeos/system/name_value_pairs_parser.cc @@ -126,7 +126,7 @@ bool NameValuePairsParser::GetNameValuePairsFromFile( return ParseNameValuePairs(contents, eq, delim); } else { if (base::SysInfo::IsRunningOnChromeOS()) - LOG(WARNING) << "Unable to read statistics file: " << file_path.value(); + VLOG(1) << "Statistics file not present: " << file_path.value(); return false; } } diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc index 3adc090..a829c35 100644 --- a/chromeos/system/statistics_provider.cc +++ b/chromeos/system/statistics_provider.cc @@ -41,8 +41,8 @@ const char kUnknownHardwareClass[] = "unknown"; const char kSerialNumber[] = "sn"; // File to get machine hardware info from, and key/value delimiters of -// the file. -// /tmp/machine-info is generated by platform/init/chromeos_startup. +// the file. machine-info is generated only for OOBE and enterprise enrollment +// and may not be present. See login-manager/init/machine-info.conf. const char kMachineHardwareInfoFile[] = "/tmp/machine-info"; const char kMachineHardwareInfoEq[] = "="; const char kMachineHardwareInfoDelim[] = " \n"; diff --git a/chromeos/tpm_token_loader.cc b/chromeos/tpm_token_loader.cc index 4b80632..c983fa0 100644 --- a/chromeos/tpm_token_loader.cc +++ b/chromeos/tpm_token_loader.cc @@ -212,7 +212,7 @@ void TPMTokenLoader::ContinueTokenInitialization() { void TPMTokenLoader::RetryTokenInitializationLater() { CHECK(thread_checker_.CalledOnValidThread()); - LOG(WARNING) << "Retry token initialization later."; + VLOG(1) << "Retry token initialization later."; base::MessageLoopProxy::current()->PostDelayedTask( FROM_HERE, base::Bind(&TPMTokenLoader::ContinueTokenInitialization, diff --git a/content/common/sandbox_linux/sandbox_linux.cc b/content/common/sandbox_linux/sandbox_linux.cc index 0c35881..88afef9 100644 --- a/content/common/sandbox_linux/sandbox_linux.cc +++ b/content/common/sandbox_linux/sandbox_linux.cc @@ -58,11 +58,7 @@ void LogSandboxStarted(const std::string& sandbox_name) { const std::string activated_sandbox = "Activated " + sandbox_name + " sandbox for process type: " + process_type + "."; -#if defined(OS_CHROMEOS) - LOG(WARNING) << activated_sandbox; -#else VLOG(1) << activated_sandbox; -#endif } #if !defined(ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) diff --git a/dbus/property.cc b/dbus/property.cc index 774719f..b518e99 100644 --- a/dbus/property.cc +++ b/dbus/property.cc @@ -136,7 +136,7 @@ void PropertySet::GetAll() { void PropertySet::OnGetAll(Response* response) { if (!response) { - LOG(WARNING) << "GetAll request failed."; + LOG(WARNING) << "GetAll request failed for: " << interface_; return; } @@ -163,7 +163,8 @@ void PropertySet::Set(PropertyBase* property, SetCallback callback) { callback)); } -void PropertySet::OnSet(PropertyBase* property, SetCallback callback, +void PropertySet::OnSet(PropertyBase* property, + SetCallback callback, Response* response) { LOG_IF(WARNING, !response) << property->name() << ": Set: failed."; if (!callback.is_null()) |