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

Side by Side Diff: chrome/browser/google/google_util.h

Issue 327793005: Change google_util::AppendGoogleLocaleParam to take in the application locale (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ChromeOS fix 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
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 // Some Google related utility functions. 5 // Some Google related utility functions.
6 6
7 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ 7 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__
8 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ 8 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__
9 9
10 #include <string> 10 #include <string>
(...skipping 16 matching lines...) Expand all
27 GURL LinkDoctorBaseURL(); 27 GURL LinkDoctorBaseURL();
28 void SetMockLinkDoctorBaseURLForTesting(); 28 void SetMockLinkDoctorBaseURLForTesting();
29 29
30 // Returns the Google locale corresponding to |application_locale|. This is 30 // Returns the Google locale corresponding to |application_locale|. This is
31 // the same string as AppendGoogleLocaleParam adds to the URL, only without the 31 // the same string as AppendGoogleLocaleParam adds to the URL, only without the
32 // leading "hl". 32 // leading "hl".
33 std::string GetGoogleLocale(const std::string& application_locale); 33 std::string GetGoogleLocale(const std::string& application_locale);
34 34
35 // Adds the Google locale string to the URL (e.g., hl=en-US). This does not 35 // Adds the Google locale string to the URL (e.g., hl=en-US). This does not
36 // check to see if the param already exists. 36 // check to see if the param already exists.
37 GURL AppendGoogleLocaleParam(const GURL& url); 37 GURL AppendGoogleLocaleParam(const GURL& url,
38 38 const std::string& application_locale);
39 // String version of AppendGoogleLocaleParam.
40 std::string StringAppendGoogleLocaleParam(const std::string& url);
41 39
42 // Returns the Google country code string for the given Google homepage URL. 40 // Returns the Google country code string for the given Google homepage URL.
43 std::string GetGoogleCountryCode(GURL google_homepage_url); 41 std::string GetGoogleCountryCode(GURL google_homepage_url);
44 42
45 // Returns the Google search URL for the given Google homepage URL. 43 // Returns the Google search URL for the given Google homepage URL.
46 GURL GetGoogleSearchURL(GURL google_homepage_url); 44 GURL GetGoogleSearchURL(GURL google_homepage_url);
47 45
48 // Returns the Google base URL specified on the command line, if it exists. 46 // Returns the Google base URL specified on the command line, if it exists.
49 // This performs some fixup and sanity-checking to ensure that the resulting URL 47 // This performs some fixup and sanity-checking to ensure that the resulting URL
50 // is valid and has no query or ref. 48 // is valid and has no query or ref.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 98
101 // True if |url| represents a valid Google home page URL. 99 // True if |url| represents a valid Google home page URL.
102 bool IsGoogleHomePageUrl(const GURL& url); 100 bool IsGoogleHomePageUrl(const GURL& url);
103 101
104 // True if |url| represents a valid Google search URL. 102 // True if |url| represents a valid Google search URL.
105 bool IsGoogleSearchUrl(const GURL& url); 103 bool IsGoogleSearchUrl(const GURL& url);
106 104
107 } // namespace google_util 105 } // namespace google_util
108 106
109 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ 107 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/google/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698