Index: chrome/browser/google/google_profile_helper.cc |
diff --git a/chrome/browser/google/google_profile_helper.cc b/chrome/browser/google/google_profile_helper.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9a341546ac298728cc4881c030e9f9f4283b12a0 |
--- /dev/null |
+++ b/chrome/browser/google/google_profile_helper.cc |
@@ -0,0 +1,31 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/google/google_profile_helper.h" |
+ |
+#include "chrome/browser/google/google_url_tracker.h" |
+#include "chrome/browser/google/google_url_tracker_factory.h" |
+#include "chrome/browser/google/google_util.h" |
+#include "url/gurl.h" |
+ |
+namespace google_profile_helper { |
+ |
+// Global functions ----------------------------------------------------------- |
+ |
+std::string GetGoogleCountryCode(Profile* profile) { |
+ 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,
|
+} |
+ |
+GURL GetGoogleHomePageURL(Profile* profile) { |
+ const GoogleURLTracker* tracker = |
+ GoogleURLTrackerFactory::GetForProfile(profile); |
+ return tracker ? tracker->google_url() |
+ : GoogleURLTracker::DefaultGoogleHomepage(); |
Peter Kasting
2014/05/30 20:50:39
Nit: Wrap like:
return tracker ?
tracker-
blundell
2014/06/02 15:42:26
Done.
|
+} |
+ |
+GURL GetGoogleSearchURL(Profile* profile) { |
+ return google_util::GetGoogleSearchURL(GetGoogleHomePageURL(profile)); |
+} |
+ |
+} // namespace google_profile_helper |