OLD | NEW |
---|---|
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 bool IsOrganic(const std::string& brand); | 88 bool IsOrganic(const std::string& brand); |
89 | 89 |
90 // True if a build should run as organic during first run. This uses | 90 // True if a build should run as organic during first run. This uses |
91 // a slightly different set of brand codes from the standard IsOrganic | 91 // a slightly different set of brand codes from the standard IsOrganic |
92 // method. | 92 // method. |
93 bool IsOrganicFirstRun(const std::string& brand); | 93 bool IsOrganicFirstRun(const std::string& brand); |
94 | 94 |
95 // True if |brand| is an internet cafe brand code. | 95 // True if |brand| is an internet cafe brand code. |
96 bool IsInternetCafeBrandCode(const std::string& brand); | 96 bool IsInternetCafeBrandCode(const std::string& brand); |
97 | 97 |
98 // A URL supports SafeSearch if it is either a Google Home Page URL or a Google | |
99 // Search URL. | |
Pam (message me for reviews)
2012/11/02 14:00:35
This comment describes the implementation. More de
Sergiu
2012/11/02 20:38:43
Done.
| |
100 bool SupportsSafeSearch(const std::string& url); | |
101 | |
98 // This class is meant to be used only from test code, and sets the brand | 102 // This class is meant to be used only from test code, and sets the brand |
99 // code returned by the function GetBrand() above while the object exists. | 103 // code returned by the function GetBrand() above while the object exists. |
100 class BrandForTesting { | 104 class BrandForTesting { |
101 public: | 105 public: |
102 explicit BrandForTesting(const std::string& brand); | 106 explicit BrandForTesting(const std::string& brand); |
103 ~BrandForTesting(); | 107 ~BrandForTesting(); |
104 | 108 |
105 private: | 109 private: |
106 std::string brand_; | 110 std::string brand_; |
107 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); | 111 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); |
108 }; | 112 }; |
109 | 113 |
110 } // namespace google_util | 114 } // namespace google_util |
111 | 115 |
112 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 116 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
OLD | NEW |