| 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 // True if SafeSearch parameters should be added to the URL. |
| 99 bool SupportsSafeSearch(const std::string& url); |
| 100 |
| 98 // This class is meant to be used only from test code, and sets the brand | 101 // 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. | 102 // code returned by the function GetBrand() above while the object exists. |
| 100 class BrandForTesting { | 103 class BrandForTesting { |
| 101 public: | 104 public: |
| 102 explicit BrandForTesting(const std::string& brand); | 105 explicit BrandForTesting(const std::string& brand); |
| 103 ~BrandForTesting(); | 106 ~BrandForTesting(); |
| 104 | 107 |
| 105 private: | 108 private: |
| 106 std::string brand_; | 109 std::string brand_; |
| 107 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); | 110 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); |
| 108 }; | 111 }; |
| 109 | 112 |
| 110 } // namespace google_util | 113 } // namespace google_util |
| 111 | 114 |
| 112 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 115 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
| OLD | NEW |