OLD | NEW |
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" | |
8 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/google/google_url_tracker_factory.h" | 9 #include "chrome/browser/google/google_url_tracker_factory.h" |
11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 11 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
13 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
14 #include "chrome/common/render_messages.h" | 13 #include "chrome/common/render_messages.h" |
15 #include "components/google/core/browser/google_util.h" | 14 #include "components/google/core/browser/google_util.h" |
16 #include "components/pref_registry/pref_registry_syncable.h" | 15 #include "components/pref_registry/pref_registry_syncable.h" |
| 16 #include "components/prefs/pref_service.h" |
17 #include "content/public/browser/render_frame_host.h" | 17 #include "content/public/browser/render_frame_host.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "google_apis/google_api_keys.h" | 19 #include "google_apis/google_api_keys.h" |
20 | 20 |
21 using content::RenderFrameHost; | 21 using content::RenderFrameHost; |
22 using content::WebContents; | 22 using content::WebContents; |
23 | 23 |
24 DEFINE_WEB_CONTENTS_USER_DATA_KEY(NavigationCorrectionTabObserver); | 24 DEFINE_WEB_CONTENTS_USER_DATA_KEY(NavigationCorrectionTabObserver); |
25 | 25 |
26 NavigationCorrectionTabObserver::NavigationCorrectionTabObserver( | 26 NavigationCorrectionTabObserver::NavigationCorrectionTabObserver( |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |