Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: components/google/core/browser/google_url_tracker.cc

Issue 701463004: Removing instrumentations for task URLFetcherCore::OnCompletedURLRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more removal. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/google/core/browser/google_url_tracker.h" 5 #include "components/google/core/browser/google_url_tracker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/profiler/scoped_tracker.h"
11 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
12 #include "components/google/core/browser/google_pref_names.h" 11 #include "components/google/core/browser/google_pref_names.h"
13 #include "components/google/core/browser/google_switches.h" 12 #include "components/google/core/browser/google_switches.h"
14 #include "components/google/core/browser/google_url_tracker_infobar_delegate.h" 13 #include "components/google/core/browser/google_url_tracker_infobar_delegate.h"
15 #include "components/google/core/browser/google_url_tracker_navigation_helper.h" 14 #include "components/google/core/browser/google_url_tracker_navigation_helper.h"
16 #include "components/google/core/browser/google_util.h" 15 #include "components/google/core/browser/google_util.h"
17 #include "components/infobars/core/infobar.h" 16 #include "components/infobars/core/infobar.h"
18 #include "components/infobars/core/infobar_manager.h" 17 #include "components/infobars/core/infobar_manager.h"
19 #include "net/base/load_flags.h" 18 #include "net/base/load_flags.h"
20 #include "net/base/net_util.h" 19 #include "net/base/net_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 99 }
101 100
102 void GoogleURLTracker::CancelGoogleURL() { 101 void GoogleURLTracker::CancelGoogleURL() {
103 client_->GetPrefs()->SetString(prefs::kLastPromptedGoogleURL, 102 client_->GetPrefs()->SetString(prefs::kLastPromptedGoogleURL,
104 fetched_google_url_.spec()); 103 fetched_google_url_.spec());
105 need_to_prompt_ = false; 104 need_to_prompt_ = false;
106 CloseAllEntries(false); 105 CloseAllEntries(false);
107 } 106 }
108 107
109 void GoogleURLTracker::OnURLFetchComplete(const net::URLFetcher* source) { 108 void GoogleURLTracker::OnURLFetchComplete(const net::URLFetcher* source) {
110 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
111 tracked_objects::ScopedTracker tracking_profile(
112 FROM_HERE_WITH_EXPLICIT_FUNCTION(
113 "422577 GoogleURLTracker::OnURLFetchComplete"));
114
115 // Delete the fetcher on this function's exit. 109 // Delete the fetcher on this function's exit.
116 scoped_ptr<net::URLFetcher> clean_up_fetcher(fetcher_.release()); 110 scoped_ptr<net::URLFetcher> clean_up_fetcher(fetcher_.release());
117 111
118 // Don't update the URL if the request didn't succeed. 112 // Don't update the URL if the request didn't succeed.
119 if (!source->GetStatus().is_success() || (source->GetResponseCode() != 200)) { 113 if (!source->GetStatus().is_success() || (source->GetResponseCode() != 200)) {
120 already_fetched_ = false; 114 already_fetched_ = false;
121 return; 115 return;
122 } 116 }
123 117
124 // See if the response data was valid. It should be 118 // See if the response data was valid. It should be
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 406 }
413 if (client_->IsListeningForNavigationStart()) { 407 if (client_->IsListeningForNavigationStart()) {
414 DCHECK(!search_committed_); 408 DCHECK(!search_committed_);
415 client_->SetListeningForNavigationStart(false); 409 client_->SetListeningForNavigationStart(false);
416 } 410 }
417 } 411 }
418 412
419 void GoogleURLTracker::NotifyGoogleURLUpdated() { 413 void GoogleURLTracker::NotifyGoogleURLUpdated() {
420 callback_list_.Notify(); 414 callback_list_.Notify();
421 } 415 }
OLDNEW
« no previous file with comments | « components/captive_portal/captive_portal_detector.cc ('k') | components/invalidation/gcm_network_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698