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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 896943002: Use UIThreadSearchTermsData to get the Google base URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index de3a1c33baabc09a621dff434926b8357f7743d4..f6dfe1199d4802def2d93938219def71132eb4a3 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -14,11 +14,11 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/google/google_profile_helper.h"
#include "chrome/browser/media/media_stream_infobar_delegate.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/hotword_service.h"
#include "chrome/browser/search/hotword_service_factory.h"
+#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
#include "chrome/browser/ui/app_list/speech_auth_helper.h"
#include "chrome/browser/ui/app_list/speech_recognizer.h"
#include "chrome/browser/ui/app_list/start_page_observer.h"
@@ -26,7 +26,6 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "components/google/core/browser/google_util.h"
#include "components/ui/zoom/zoom_controller.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
@@ -67,14 +66,6 @@ bool InSpeechRecognition(SpeechRecognitionState state) {
state == SPEECH_RECOGNITION_IN_SPEECH;
}
-GURL GetGoogleBaseURL(Profile* profile) {
- GURL base_url(google_util::CommandLineGoogleBaseURL());
- if (!base_url.is_valid())
- base_url = google_profile_helper::GetGoogleHomePageURL(profile);
-
- return base_url;
-}
-
} // namespace
class StartPageService::ProfileDestroyObserver
@@ -526,7 +517,8 @@ void StartPageService::FetchDoodleJson() {
GURL::Replacements replacements;
replacements.SetPathStr(path);
- GURL doodle_url = GetGoogleBaseURL(profile_).ReplaceComponents(replacements);
+ GURL google_base_url(UIThreadSearchTermsData(profile_).GoogleBaseURLValue());
+ GURL doodle_url = google_base_url.ReplaceComponents(replacements);
doodle_fetcher_.reset(
net::URLFetcher::Create(0, doodle_url, net::URLFetcher::GET, this));
doodle_fetcher_->SetRequestContext(profile_->GetRequestContext());
@@ -565,7 +557,8 @@ void StartPageService::OnURLFetchComplete(const net::URLFetcher* source) {
contents_->GetWebUI()->CallJavascriptFunction(
"appList.startPage.onAppListDoodleUpdated", *doodle_json,
- base::StringValue(GetGoogleBaseURL(profile_).spec()));
+ base::StringValue(
+ UIThreadSearchTermsData(profile_).GoogleBaseURLValue()));
}
// Check for a new doodle.
« no previous file with comments | « chrome/browser/search_engines/ui_thread_search_terms_data.cc ('k') | chrome/browser/ui/navigation_correction_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698