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

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

Issue 8728004: Add more flexible handling of what is considered a google home page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix using directive Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 9 #pragma once
10 10
(...skipping 11 matching lines...) Expand all
22 // check to see if the param already exists. 22 // check to see if the param already exists.
23 GURL AppendGoogleLocaleParam(const GURL& url); 23 GURL AppendGoogleLocaleParam(const GURL& url);
24 24
25 // String version of AppendGoogleLocaleParam. 25 // String version of AppendGoogleLocaleParam.
26 std::string StringAppendGoogleLocaleParam(const std::string& url); 26 std::string StringAppendGoogleLocaleParam(const std::string& url);
27 27
28 // Adds the Google TLD string to the URL (e.g., sd=com). This does not 28 // Adds the Google TLD string to the URL (e.g., sd=com). This does not
29 // check to see if the param already exists. 29 // check to see if the param already exists.
30 GURL AppendGoogleTLDParam(const GURL& url); 30 GURL AppendGoogleTLDParam(const GURL& url);
31 31
32 // True if |url| represents a valid Google home page URL.
33 bool IsGoogleHomePageUrl(const std::string& url);
SteveT 2011/11/28 21:04:49 Nit: Please move down after GetReactivationBrand,
Roger Tawa OOO till Jul 10th 2011/11/29 16:00:09 Done.
34
32 // Returns in |brand| the brand code or distribution tag that has been 35 // Returns in |brand| the brand code or distribution tag that has been
33 // assigned to a partner. Returns false if the information is not available. 36 // assigned to a partner. Returns false if the information is not available.
34 bool GetBrand(std::string* brand); 37 bool GetBrand(std::string* brand);
35 38
36 // Returns in |brand| the reactivation brand code or distribution tag 39 // Returns in |brand| the reactivation brand code or distribution tag
37 // that has been assigned to a partner for reactivating a dormant chrome 40 // that has been assigned to a partner for reactivating a dormant chrome
38 // install. Returns false if the information is not available. 41 // install. Returns false if the information is not available.
39 bool GetReactivationBrand(std::string* brand); 42 bool GetReactivationBrand(std::string* brand);
40 43
41 // True if a build is strictly organic, according to its brand code. 44 // True if a build is strictly organic, according to its brand code.
(...skipping 15 matching lines...) Expand all
57 ~BrandForTesting(); 60 ~BrandForTesting();
58 61
59 private: 62 private:
60 std::string brand_; 63 std::string brand_;
61 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); 64 DISALLOW_COPY_AND_ASSIGN(BrandForTesting);
62 }; 65 };
63 66
64 } // namespace google_util 67 } // namespace google_util
65 68
66 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ 69 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698