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

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

Issue 2799083003: Replace manual GoogleURLTracker update request with call to utility function. (Closed)
Patch Set: Remove unneeded #includes Created 3 years, 8 months 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 "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/google/google_url_tracker_factory.h" 9 #include "chrome/browser/google/google_url_tracker_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 24 matching lines...) Expand all
35 base::Bind(&NavigationCorrectionTabObserver::OnEnabledChanged, 35 base::Bind(&NavigationCorrectionTabObserver::OnEnabledChanged,
36 base::Unretained(this))); 36 base::Unretained(this)));
37 } 37 }
38 38
39 GoogleURLTracker* google_url_tracker = 39 GoogleURLTracker* google_url_tracker =
40 GoogleURLTrackerFactory::GetForProfile(profile_); 40 GoogleURLTrackerFactory::GetForProfile(profile_);
41 if (google_url_tracker) { 41 if (google_url_tracker) {
42 if (google_util::IsGoogleDomainUrl(GetNavigationCorrectionURL(), 42 if (google_util::IsGoogleDomainUrl(GetNavigationCorrectionURL(),
43 google_util::ALLOW_SUBDOMAIN, 43 google_util::ALLOW_SUBDOMAIN,
44 google_util::ALLOW_NON_STANDARD_PORTS)) 44 google_util::ALLOW_NON_STANDARD_PORTS))
45 google_url_tracker->RequestServerCheck(false); 45 google_url_tracker->RequestServerCheck();
46 google_url_updated_subscription_ = google_url_tracker->RegisterCallback( 46 google_url_updated_subscription_ = google_url_tracker->RegisterCallback(
47 base::Bind(&NavigationCorrectionTabObserver::OnGoogleURLUpdated, 47 base::Bind(&NavigationCorrectionTabObserver::OnGoogleURLUpdated,
48 base::Unretained(this))); 48 base::Unretained(this)));
49 } 49 }
50 } 50 }
51 51
52 NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() { 52 NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {
53 } 53 }
54 54
55 // static 55 // static
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 RenderFrameHost* render_frame_host) { 98 RenderFrameHost* render_frame_host) {
99 GURL google_base_url(UIThreadSearchTermsData(profile_).GoogleBaseURLValue()); 99 GURL google_base_url(UIThreadSearchTermsData(profile_).GoogleBaseURLValue());
100 render_frame_host->Send(new ChromeViewMsg_SetNavigationCorrectionInfo( 100 render_frame_host->Send(new ChromeViewMsg_SetNavigationCorrectionInfo(
101 render_frame_host->GetRoutingID(), 101 render_frame_host->GetRoutingID(),
102 GetNavigationCorrectionURL(), 102 GetNavigationCorrectionURL(),
103 google_util::GetGoogleLocale(g_browser_process->GetApplicationLocale()), 103 google_util::GetGoogleLocale(g_browser_process->GetApplicationLocale()),
104 google_util::GetGoogleCountryCode(google_base_url), 104 google_util::GetGoogleCountryCode(google_base_url),
105 google_apis::GetAPIKey(), 105 google_apis::GetAPIKey(),
106 google_util::GetGoogleSearchURL(google_base_url))); 106 google_util::GetGoogleSearchURL(google_base_url)));
107 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/profile_resetter/profile_resetter.cc ('k') | components/google/core/browser/google_url_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698