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

Side by Side Diff: chrome/browser/ui/navigation_correction_tab_observer.cc

Issue 808253006: Remove the GoogleURLTracker infobar functionality entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix size_t -> int conversion (since I turned off the warning disable for it) Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/navigation_correction_tab_observer.h" 5 #include "chrome/browser/ui/navigation_correction_tab_observer.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/google/google_profile_helper.h" 10 #include "chrome/browser/google/google_profile_helper.h"
(...skipping 23 matching lines...) Expand all
34 pref_change_registrar_.Init(prefs); 34 pref_change_registrar_.Init(prefs);
35 pref_change_registrar_.Add( 35 pref_change_registrar_.Add(
36 prefs::kAlternateErrorPagesEnabled, 36 prefs::kAlternateErrorPagesEnabled,
37 base::Bind(&NavigationCorrectionTabObserver::OnEnabledChanged, 37 base::Bind(&NavigationCorrectionTabObserver::OnEnabledChanged,
38 base::Unretained(this))); 38 base::Unretained(this)));
39 } 39 }
40 40
41 GoogleURLTracker* google_url_tracker = 41 GoogleURLTracker* google_url_tracker =
42 GoogleURLTrackerFactory::GetForProfile(profile_); 42 GoogleURLTrackerFactory::GetForProfile(profile_);
43 if (google_url_tracker) { 43 if (google_url_tracker) {
44 if (google_util::IsGoogleDomainUrl(GetNavigationCorrectionURL(),
mmenke 2015/01/05 15:35:51 It's possible that navigation corrections are disa
mmenke 2015/01/05 15:35:51 Think this needs a comment.
Peter Kasting 2015/01/05 20:15:47 They won't result in redundant checks, but moving
Peter Kasting 2015/01/05 20:15:47 What would you propose? (The code seems pretty cl
mmenke 2015/01/05 21:01:53 I'd suggest "// If navigation corrections will be
mmenke 2015/01/05 21:01:53 Something in both places seems reasonable (Or some
45 google_util::ALLOW_SUBDOMAIN,
46 google_util::ALLOW_NON_STANDARD_PORTS))
47 google_url_tracker->RequestServerCheck(false);
44 google_url_updated_subscription_ = google_url_tracker->RegisterCallback( 48 google_url_updated_subscription_ = google_url_tracker->RegisterCallback(
45 base::Bind(&NavigationCorrectionTabObserver::OnGoogleURLUpdated, 49 base::Bind(&NavigationCorrectionTabObserver::OnGoogleURLUpdated,
46 base::Unretained(this))); 50 base::Unretained(this)));
47 } 51 }
48 } 52 }
49 53
50 NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() { 54 NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {
51 } 55 }
52 56
53 // static 57 // static
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 rfh->Send(new ChromeViewMsg_SetNavigationCorrectionInfo( 98 rfh->Send(new ChromeViewMsg_SetNavigationCorrectionInfo(
95 rfh->GetRoutingID(), 99 rfh->GetRoutingID(),
96 GetNavigationCorrectionURL(), 100 GetNavigationCorrectionURL(),
97 google_util::GetGoogleLocale(g_browser_process->GetApplicationLocale()), 101 google_util::GetGoogleLocale(g_browser_process->GetApplicationLocale()),
98 google_util::GetGoogleCountryCode( 102 google_util::GetGoogleCountryCode(
99 google_profile_helper::GetGoogleHomePageURL(profile_)), 103 google_profile_helper::GetGoogleHomePageURL(profile_)),
100 google_apis::GetAPIKey(), 104 google_apis::GetAPIKey(),
101 google_util::GetGoogleSearchURL( 105 google_util::GetGoogleSearchURL(
102 google_profile_helper::GetGoogleHomePageURL(profile_)))); 106 google_profile_helper::GetGoogleHomePageURL(profile_))));
103 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698