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

Side by Side Diff: chrome/browser/google/google_profile_helper.cc

Issue 303233006: Abstract GoogleURLTracker & google_util Profile dependencies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comments Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/google/google_profile_helper.h"
6
7 #include "chrome/browser/google/google_url_tracker.h"
8 #include "chrome/browser/google/google_url_tracker_factory.h"
9 #include "chrome/browser/google/google_util.h"
10 #include "url/gurl.h"
11
12 namespace google_profile_helper {
13
14 // Global functions -----------------------------------------------------------
15
16 std::string GetGoogleCountryCode(Profile* profile) {
17 return google_util::GetGoogleCountryCode(GetGoogleHomePageURL(profile));
Peter Kasting 2014/05/30 20:50:39 I wonder if this function, and the bottom function
blundell 2014/06/02 15:42:26 Yep, you're right. Done. On 2014/05/30 20:50:39,
18 }
19
20 GURL GetGoogleHomePageURL(Profile* profile) {
21 const GoogleURLTracker* tracker =
22 GoogleURLTrackerFactory::GetForProfile(profile);
23 return tracker ? tracker->google_url()
24 : GoogleURLTracker::DefaultGoogleHomepage();
Peter Kasting 2014/05/30 20:50:39 Nit: Wrap like: return tracker ? tracker-
blundell 2014/06/02 15:42:26 Done.
25 }
26
27 GURL GetGoogleSearchURL(Profile* profile) {
28 return google_util::GetGoogleSearchURL(GetGoogleHomePageURL(profile));
29 }
30
31 } // namespace google_profile_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698