From c571107b9edb9d666d7bcfa7d371ba366b4a4afb Mon Sep 17 00:00:00 2001 From: vadimt Date: Wed, 10 Dec 2014 17:00:31 -0800 Subject: Removing profiler instrumentations for task WebDataRequestManager::RequestCompletedOnThread since the jank has been fixed. I'm doing this manually, so please review. Not reverting changes automatically, since the instrumentations sat in the code long enough (up to ~2 months), and there were totally 13 CLs with instrumentations, so reverting can easily become very messy. Please review. BUG=422460 Review URL: https://codereview.chromium.org/784613002 Cr-Commit-Position: refs/heads/master@{#307813} --- .../browser/password_manager/password_store_win.cc | 6 -- .../policy/cloud/user_policy_signin_service.cc | 6 -- chrome/browser/sync/profile_sync_service.cc | 6 -- chrome/browser/ui/webui/signin_internals_ui.cc | 6 -- chrome/common/chrome_version_info.cc | 6 -- chrome/common/chrome_version_info_win.cc | 5 - .../core/browser/autocomplete_history_manager.cc | 6 -- .../autofill/core/browser/personal_data_manager.cc | 6 -- components/search_engines/template_url_service.cc | 108 ++++----------------- .../signin/core/browser/about_signin_internals.cc | 57 ----------- .../signin/core/browser/account_tracker_service.cc | 6 -- .../mutable_profile_oauth2_token_service.cc | 6 -- .../core/browser/signin_account_id_helper.cc | 6 -- google_apis/gaia/account_tracker.cc | 44 +-------- google_apis/gaia/identity_provider.cc | 6 -- google_apis/gaia/oauth2_token_service.cc | 36 ------- 16 files changed, 19 insertions(+), 297 deletions(-) diff --git a/chrome/browser/password_manager/password_store_win.cc b/chrome/browser/password_manager/password_store_win.cc index ad6264e..8f706d9 100644 --- a/chrome/browser/password_manager/password_store_win.cc +++ b/chrome/browser/password_manager/password_store_win.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "components/os_crypt/ie7_password_win.h" @@ -141,11 +140,6 @@ std::vector PasswordStoreWin::DBHandler::GetIE7Results( void PasswordStoreWin::DBHandler::OnWebDataServiceRequestDone( PasswordWebDataService::Handle handle, const WDTypedResult* result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 PasswordStoreWin::DBHandler::OnWebDataServiceRequestDone")); - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); PendingRequestMap::iterator i = pending_requests_.find(handle); diff --git a/chrome/browser/policy/cloud/user_policy_signin_service.cc b/chrome/browser/policy/cloud/user_policy_signin_service.cc index 5d27709..e39ccc6 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback.h" -#include "base/profiler/scoped_tracker.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/profiles/profile.h" @@ -108,11 +107,6 @@ void UserPolicySigninService::CallPolicyRegistrationCallback( void UserPolicySigninService::OnRefreshTokenAvailable( const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 UserPolicySigninService::OnRefreshTokenAvailable")); - // If using a TestingProfile with no UserCloudPolicyManager, skip // initialization. if (!policy_manager()) { diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc index 7558455..37787a4 100644 --- a/chrome/browser/sync/profile_sync_service.cc +++ b/chrome/browser/sync/profile_sync_service.cc @@ -19,7 +19,6 @@ #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/string16.h" #include "base/strings/stringprintf.h" #include "base/threading/thread_restrictions.h" @@ -766,11 +765,6 @@ void ProfileSyncService::OnGetTokenFailure( void ProfileSyncService::OnRefreshTokenAvailable( const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 ProfileSyncService::OnRefreshTokenAvailable")); - if (account_id == signin_->GetAccountIdToUse()) OnRefreshTokensLoaded(); } diff --git a/chrome/browser/ui/webui/signin_internals_ui.cc b/chrome/browser/ui/webui/signin_internals_ui.cc index 3ff88c2..322f1ec 100644 --- a/chrome/browser/ui/webui/signin_internals_ui.cc +++ b/chrome/browser/ui/webui/signin_internals_ui.cc @@ -5,7 +5,6 @@ #include "chrome/browser/ui/webui/signin_internals_ui.h" #include "base/hash.h" -#include "base/profiler/scoped_tracker.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/about_signin_internals_factory.h" #include "chrome/common/url_constants.h" @@ -80,11 +79,6 @@ bool SignInInternalsUI::OverrideHandleWebUIMessage( void SignInInternalsUI::OnSigninStateChanged( const base::DictionaryValue* info) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 SignInInternalsUI::OnSigninStateChanged")); - web_ui()->CallJavascriptFunction( "chrome.signin.onSigninInfoChanged.fire", *info); } diff --git a/chrome/common/chrome_version_info.cc b/chrome/common/chrome_version_info.cc index 6c2ae65..4562bfd 100644 --- a/chrome/common/chrome_version_info.cc +++ b/chrome/common/chrome_version_info.cc @@ -6,7 +6,6 @@ #include "base/basictypes.h" #include "base/file_version_info.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" #include "build/build_config.h" @@ -44,11 +43,6 @@ bool VersionInfo::IsOfficialBuild() const { } std::string VersionInfo::CreateVersionString() const { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 VersionInfo::CreateVersionString")); - std::string current_version; current_version += Version(); #if !defined(GOOGLE_CHROME_BUILD) diff --git a/chrome/common/chrome_version_info_win.cc b/chrome/common/chrome_version_info_win.cc index 4d87a80..9f59580 100644 --- a/chrome/common/chrome_version_info_win.cc +++ b/chrome/common/chrome_version_info_win.cc @@ -8,7 +8,6 @@ #include "base/debug/profiler.h" #include "base/files/file_path.h" #include "base/path_service.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "chrome/installer/util/google_update_settings.h" @@ -18,10 +17,6 @@ namespace chrome { // static std::string VersionInfo::GetVersionStringModifier() { - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 VersionInfo::GetVersionStringModifier")); - #if defined(GOOGLE_CHROME_BUILD) base::FilePath module; base::string16 channel; diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc index 1c970fc..8bc4970 100644 --- a/components/autofill/core/browser/autocomplete_history_manager.cc +++ b/components/autofill/core/browser/autocomplete_history_manager.cc @@ -7,7 +7,6 @@ #include #include "base/prefs/pref_service.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "components/autofill/core/browser/autofill_client.h" @@ -54,11 +53,6 @@ AutocompleteHistoryManager::~AutocompleteHistoryManager() { void AutocompleteHistoryManager::OnWebDataServiceRequestDone( WebDataServiceBase::Handle h, const WDTypedResult* result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AutocompleteHistoryManager::OnWebDataServiceRequestDone")); - DCHECK(pending_query_handle_); pending_query_handle_ = 0; diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc index 9e2a4ec..166fa52 100644 --- a/components/autofill/core/browser/personal_data_manager.cc +++ b/components/autofill/core/browser/personal_data_manager.cc @@ -12,7 +12,6 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/prefs/pref_service.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -189,11 +188,6 @@ PersonalDataManager::~PersonalDataManager() { void PersonalDataManager::OnWebDataServiceRequestDone( WebDataServiceBase::Handle h, const WDTypedResult* result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 PersonalDataManager::OnWebDataServiceRequestDone")); - DCHECK(pending_profiles_query_ || pending_creditcards_query_); if (!result) { diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc index 0c97e1f..86f6cee 100644 --- a/components/search_engines/template_url_service.cc +++ b/components/search_engines/template_url_service.cc @@ -15,7 +15,6 @@ #include "base/memory/scoped_vector.h" #include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" -#include "base/profiler/scoped_tracker.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" @@ -826,21 +825,11 @@ scoped_ptr void TemplateURLService::OnWebDataServiceRequestDone( KeywordWebDataService::Handle h, const WDTypedResult* result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone")); - // Reset the load_handle so that we don't try and cancel the load in // the destructor. load_handle_ = 0; if (!result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 1")); - // Results are null if the database went away or (most likely) wasn't // loaded. load_failed_ = true; @@ -851,77 +840,32 @@ void TemplateURLService::OnWebDataServiceRequestDone( TemplateURLVector template_urls; int new_resource_keyword_version = 0; - { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile2( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 2")); - - GetSearchProvidersUsingKeywordResult( - *result, - web_data_service_.get(), - prefs_, - &template_urls, - (default_search_provider_source_ == DefaultSearchManager::FROM_USER) - ? initial_default_search_provider_.get() - : NULL, - search_terms_data(), - &new_resource_keyword_version, - &pre_sync_deletes_); - } + GetSearchProvidersUsingKeywordResult( + *result, web_data_service_.get(), prefs_, &template_urls, + (default_search_provider_source_ == DefaultSearchManager::FROM_USER) + ? initial_default_search_provider_.get() + : NULL, + search_terms_data(), &new_resource_keyword_version, &pre_sync_deletes_); KeywordWebDataService::BatchModeScoper scoper(web_data_service_.get()); - { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile4( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 4")); - - PatchMissingSyncGUIDs(&template_urls); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile41( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 41")); - - SetTemplateURLs(&template_urls); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile42( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 42")); - - // This initializes provider_map_ which should be done before - // calling UpdateKeywordSearchTermsForURL. - // This also calls NotifyObservers. - ChangeToLoadedState(); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile43( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 43")); + PatchMissingSyncGUIDs(&template_urls); + SetTemplateURLs(&template_urls); - // Index any visits that occurred before we finished loading. - for (size_t i = 0; i < visits_to_add_.size(); ++i) - UpdateKeywordSearchTermsForURL(visits_to_add_[i]); - visits_to_add_.clear(); + // This initializes provider_map_ which should be done before + // calling UpdateKeywordSearchTermsForURL. + // This also calls NotifyObservers. + ChangeToLoadedState(); - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile44( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 44")); + // Index any visits that occurred before we finished loading. + for (size_t i = 0; i < visits_to_add_.size(); ++i) + UpdateKeywordSearchTermsForURL(visits_to_add_[i]); + visits_to_add_.clear(); - if (new_resource_keyword_version) - web_data_service_->SetBuiltinKeywordVersion(new_resource_keyword_version); - } + if (new_resource_keyword_version) + web_data_service_->SetBuiltinKeywordVersion(new_resource_keyword_version); if (default_search_provider_) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile5( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::OnWebDataServiceRequestDone 5")); - UMA_HISTOGRAM_ENUMERATION( "Search.DefaultSearchProviderType", TemplateURLPrepopulateData::GetEngineType( @@ -1632,33 +1576,17 @@ void TemplateURLService::SetTemplateURLs(TemplateURLVector* urls) { } void TemplateURLService::ChangeToLoadedState() { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::ChangeToLoadedState 1")); - DCHECK(!loaded_); provider_map_->Init(template_urls_, search_terms_data()); loaded_ = true; - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile2( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::ChangeToLoadedState 2")); - // This will cause a call to NotifyObservers(). ApplyDefaultSearchChangeNoMetrics( initial_default_search_provider_ ? &initial_default_search_provider_->data() : NULL, default_search_provider_source_); initial_default_search_provider_.reset(); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile3( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 TemplateURLService::ChangeToLoadedState 3")); - on_loaded_callbacks_.Notify(); } diff --git a/components/signin/core/browser/about_signin_internals.cc b/components/signin/core/browser/about_signin_internals.cc index 9ff3716..bcf94ea 100644 --- a/components/signin/core/browser/about_signin_internals.cc +++ b/components/signin/core/browser/about_signin_internals.cc @@ -10,7 +10,6 @@ #include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/prefs/pref_service.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" @@ -226,25 +225,10 @@ void AboutSigninInternals::NotifyObservers() { if (!signin_observers_.might_have_observers()) return; - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::NotifyObservers")); - const std::string product_version = client_->GetProductVersion(); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile05( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::NotifyObservers 0.5")); - scoped_ptr signin_status_value = signin_status_.ToValue(product_version); - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::NotifyObservers1")); - FOR_EACH_OBSERVER(AboutSigninInternals::Observer, signin_observers_, OnSigninStateChanged(signin_status_value.get())); @@ -258,11 +242,6 @@ void AboutSigninInternals::OnAccessTokenRequested( const std::string& account_id, const std::string& consumer_id, const OAuth2TokenService::ScopeSet& scopes) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::OnAccessTokenRequested")); - TokenInfo* token = signin_status_.FindToken(account_id, consumer_id, scopes); if (token) { *token = TokenInfo(consumer_id, scopes); @@ -457,11 +436,6 @@ AboutSigninInternals::TokenInfo* AboutSigninInternals::SigninStatus::FindToken( scoped_ptr AboutSigninInternals::SigninStatus::ToValue( std::string product_version) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue1")); - scoped_ptr signin_status(new base::DictionaryValue()); base::ListValue* signin_info = new base::ListValue(); signin_status->Set("signin_info", signin_info); @@ -485,11 +459,6 @@ scoped_ptr AboutSigninInternals::SigninStatus::ToValue( AddSectionEntry(basic_info, "Account Consistency Enabled?", switches::IsEnableAccountConsistency() == true ? "True" : "False"); - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile2( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue2")); - // Only add username. SID and LSID have moved to tokens section. const std::string field = SigninStatusFieldToLabel(static_cast(USERNAME)); @@ -498,11 +467,6 @@ scoped_ptr AboutSigninInternals::SigninStatus::ToValue( untimed_signin_fields[USERNAME - UNTIMED_FIELDS_BEGIN]); #if !defined(OS_CHROMEOS) - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile3( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue3")); - // Time and status information of the possible sign in types. base::ListValue* detailed_info = AddSection(signin_info, "Last Signin Details"); @@ -517,37 +481,16 @@ scoped_ptr AboutSigninInternals::SigninStatus::ToValue( } #endif // !defined(OS_CHROMEOS) - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile4( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue4")); - // Token information for all services. base::ListValue* token_info = new base::ListValue(); signin_status->Set("token_info", token_info); for (TokenInfoMap::iterator it = token_info_map.begin(); it != token_info_map.end(); ++it) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile41( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue41")); - base::ListValue* token_details = AddSection(token_info, it->first); - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile42( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue42")); - std::sort(it->second.begin(), it->second.end(), TokenInfo::LessThan); const std::vector& tokens = it->second; - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile43( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AboutSigninInternals::SigninStatus::ToValue43")); - for (size_t i = 0; i < tokens.size(); ++i) { base::DictionaryValue* token_info = tokens[i]->ToValue(); token_details->Append(token_info); diff --git a/components/signin/core/browser/account_tracker_service.cc b/components/signin/core/browser/account_tracker_service.cc index 50a9c9d..84d7e77 100644 --- a/components/signin/core/browser/account_tracker_service.cc +++ b/components/signin/core/browser/account_tracker_service.cc @@ -9,7 +9,6 @@ #include "base/debug/trace_event.h" #include "base/logging.h" #include "base/prefs/scoped_user_pref_update.h" -#include "base/profiler/scoped_tracker.h" #include "base/strings/utf_string_conversions.h" #include "components/signin/core/browser/refresh_token_annotation_request.h" #include "components/signin/core/browser/signin_client.h" @@ -272,11 +271,6 @@ AccountTrackerService::GetMigrationState(PrefService* pref_service) { void AccountTrackerService::OnRefreshTokenAvailable( const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTrackerService::OnRefreshTokenAvailable")); - TRACE_EVENT1("AccountTrackerService", "AccountTracker::OnRefreshTokenAvailable", "account_id", diff --git a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc index 7393418..991fa23 100644 --- a/components/signin/core/browser/mutable_profile_oauth2_token_service.cc +++ b/components/signin/core/browser/mutable_profile_oauth2_token_service.cc @@ -4,7 +4,6 @@ #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h" -#include "base/profiler/scoped_tracker.h" #include "components/signin/core/browser/signin_client.h" #include "components/signin/core/browser/signin_metrics.h" #include "components/signin/core/browser/webdata/token_web_data.h" @@ -188,11 +187,6 @@ void MutableProfileOAuth2TokenService::LoadCredentials( void MutableProfileOAuth2TokenService::OnWebDataServiceRequestDone( WebDataServiceBase::Handle handle, const WDTypedResult* result) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 MutableProfileOAuth2Token...::OnWebDataServiceRequestDone")); - DCHECK_EQ(web_data_service_request_, handle); web_data_service_request_ = 0; diff --git a/components/signin/core/browser/signin_account_id_helper.cc b/components/signin/core/browser/signin_account_id_helper.cc index 52dab78..7e54853 100644 --- a/components/signin/core/browser/signin_account_id_helper.cc +++ b/components/signin/core/browser/signin_account_id_helper.cc @@ -5,7 +5,6 @@ #include "components/signin/core/browser/signin_account_id_helper.h" #include "base/prefs/pref_service.h" -#include "base/profiler/scoped_tracker.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/signin/core/browser/signin_client.h" #include "components/signin/core/common/signin_pref_names.h" @@ -137,11 +136,6 @@ void SigninAccountIdHelper::GoogleSignedOut(const std::string& account_id, void SigninAccountIdHelper::OnRefreshTokenAvailable( const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 SigninAccountIdHelper::OnRefreshTokenAvailable")); - if (account_id == signin_manager_->GetAuthenticatedAccountId()) { std::string current_gaia_id = client_->GetPrefs()->GetString(prefs::kGoogleServicesUserAccountId); diff --git a/google_apis/gaia/account_tracker.cc b/google_apis/gaia/account_tracker.cc index 794089a..50c4e70 100644 --- a/google_apis/gaia/account_tracker.cc +++ b/google_apis/gaia/account_tracker.cc @@ -6,7 +6,6 @@ #include "base/debug/trace_event.h" #include "base/logging.h" -#include "base/profiler/scoped_tracker.h" #include "base/stl_util.h" #include "net/url_request/url_request_context_getter.h" @@ -85,11 +84,6 @@ AccountIds AccountTracker::FindAccountIdsByGaiaId(const std::string& gaia_id) { } void AccountTracker::OnRefreshTokenAvailable(const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::OnRefreshTokenAvailable")); - TRACE_EVENT1("identity", "AccountTracker::OnRefreshTokenAvailable", "account_key", @@ -164,11 +158,6 @@ void AccountTracker::NotifyAccountRemoved(const AccountState& account) { } void AccountTracker::NotifySignInChanged(const AccountState& account) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::NotifySignInChanged")); - DCHECK(!account.ids.gaia.empty()); FOR_EACH_OBSERVER(Observer, observer_list_, @@ -177,10 +166,6 @@ void AccountTracker::NotifySignInChanged(const AccountState& account) { void AccountTracker::UpdateSignInState(const std::string account_key, bool is_signed_in) { - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::UpdateSignInState")); - StartTrackingAccount(account_key); AccountState& account = accounts_[account_key]; bool needs_gaia_id = account.ids.gaia.empty(); @@ -195,11 +180,6 @@ void AccountTracker::UpdateSignInState(const std::string account_key, } void AccountTracker::StartTrackingAccount(const std::string account_key) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::StartTrackingAccount")); - if (!ContainsKey(accounts_, account_key)) { DVLOG(1) << "StartTracking " << account_key; AccountState account_state; @@ -231,38 +211,16 @@ void AccountTracker::StopTrackingAllAccounts() { } void AccountTracker::StartFetchingUserInfo(const std::string account_key) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::StartFetchingUserInfo")); - - if (ContainsKey(user_info_requests_, account_key)) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::StartFetchingUserInfo 1")); - + if (ContainsKey(user_info_requests_, account_key)) DeleteFetcher(user_info_requests_[account_key]); - } DVLOG(1) << "StartFetching " << account_key; - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile2( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::StartFetchingUserInfo 2")); - AccountIdFetcher* fetcher = new AccountIdFetcher(identity_provider_->GetTokenService(), request_context_getter_.get(), this, account_key); user_info_requests_[account_key] = fetcher; - - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile3( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 AccountTracker::StartFetchingUserInfo 3")); - fetcher->Start(); } diff --git a/google_apis/gaia/identity_provider.cc b/google_apis/gaia/identity_provider.cc index 86edfb8..842891e 100644 --- a/google_apis/gaia/identity_provider.cc +++ b/google_apis/gaia/identity_provider.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/profiler/scoped_tracker.h" #include "google_apis/gaia/identity_provider.h" IdentityProvider::Observer::~Observer() {} @@ -40,11 +39,6 @@ void IdentityProvider::RemoveObserver(Observer* observer) { } void IdentityProvider::OnRefreshTokenAvailable(const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 IdentityProvider::OnRefreshTokenAvailable")); - if (account_id != GetActiveAccountId()) return; FOR_EACH_OBSERVER(OAuth2TokenService::Observer, diff --git a/google_apis/gaia/oauth2_token_service.cc b/google_apis/gaia/oauth2_token_service.cc index 842bea7..b0c4aa4 100644 --- a/google_apis/gaia/oauth2_token_service.cc +++ b/google_apis/gaia/oauth2_token_service.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" -#include "base/profiler/scoped_tracker.h" #include "base/rand_util.h" #include "base/stl_util.h" #include "base/time/time.h" @@ -215,11 +214,6 @@ OAuth2TokenService::Fetcher* OAuth2TokenService::Fetcher::CreateAndStart( scopes, waiting_request); - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::Fetcher::CreateAndStart")); - fetcher->Start(); return fetcher; } @@ -467,11 +461,6 @@ OAuth2TokenService::StartRequestForClientWithContext( Consumer* consumer) { DCHECK(CalledOnValidThread()); - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile1( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::StartRequestForClientWithContext 1")); - scoped_ptr request(new RequestImpl(account_id, consumer)); FOR_EACH_OBSERVER(DiagnosticsObserver, diagnostics_observer_list_, OnAccessTokenRequested(account_id, @@ -479,11 +468,6 @@ OAuth2TokenService::StartRequestForClientWithContext( scopes)); if (!RefreshTokenIsAvailable(account_id)) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile2( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::StartRequestForClientWithContext 2")); - GoogleServiceAuthError error(GoogleServiceAuthError::USER_NOT_SIGNED_UP); FOR_EACH_OBSERVER(DiagnosticsObserver, diagnostics_observer_list_, @@ -504,11 +488,6 @@ OAuth2TokenService::StartRequestForClientWithContext( account_id, scopes); if (HasCacheEntry(request_parameters)) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile3( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::StartRequestForClientWithContext 3")); - StartCacheLookupRequest(request.get(), request_parameters, consumer); } else { FetchOAuth2Token(request.get(), @@ -527,11 +506,6 @@ void OAuth2TokenService::FetchOAuth2Token(RequestImpl* request, const std::string& client_id, const std::string& client_secret, const ScopeSet& scopes) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::FetchOAuth2Token")); - // If there is already a pending fetcher for |scopes| and |account_id|, // simply register this |request| for those results rather than starting // a new fetcher. @@ -783,11 +757,6 @@ void OAuth2TokenService::CancelFetchers( void OAuth2TokenService::FireRefreshTokenAvailable( const std::string& account_id) { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::FireRefreshTokenAvailable")); - FOR_EACH_OBSERVER(Observer, observer_list_, OnRefreshTokenAvailable(account_id)); } @@ -799,11 +768,6 @@ void OAuth2TokenService::FireRefreshTokenRevoked( } void OAuth2TokenService::FireRefreshTokensLoaded() { - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. - tracked_objects::ScopedTracker tracking_profile( - FROM_HERE_WITH_EXPLICIT_FUNCTION( - "422460 OAuth2TokenService::FireRefreshTokensLoaded")); - FOR_EACH_OBSERVER(Observer, observer_list_, OnRefreshTokensLoaded()); } -- cgit v1.1