OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 bool GetReactivationBrand(std::string* brand); | 39 bool GetReactivationBrand(std::string* brand); |
40 | 40 |
41 // True if a build is strictly organic, according to its brand code. | 41 // True if a build is strictly organic, according to its brand code. |
42 bool IsOrganic(const std::string& brand); | 42 bool IsOrganic(const std::string& brand); |
43 | 43 |
44 // True if a build should run as organic during first run. This uses | 44 // True if a build should run as organic during first run. This uses |
45 // a slightly different set of brand codes from the standard IsOrganic | 45 // a slightly different set of brand codes from the standard IsOrganic |
46 // method. | 46 // method. |
47 bool IsOrganicFirstRun(const std::string& brand); | 47 bool IsOrganicFirstRun(const std::string& brand); |
48 | 48 |
| 49 // True if |brand| is an internet cafe brand code. |
| 50 bool IsInternetCafeBrandCode(const std::string& brand); |
| 51 |
49 // This class is meant to be used only from test code, and sets the brand | 52 // This class is meant to be used only from test code, and sets the brand |
50 // code returned by the function GetBrand() above while the object exists. | 53 // code returned by the function GetBrand() above while the object exists. |
51 class BrandForTesting { | 54 class BrandForTesting { |
52 public: | 55 public: |
53 explicit BrandForTesting(const std::string& brand); | 56 explicit BrandForTesting(const std::string& brand); |
54 ~BrandForTesting(); | 57 ~BrandForTesting(); |
55 | 58 |
56 private: | 59 private: |
57 std::string brand_; | 60 std::string brand_; |
58 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); | 61 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); |
59 }; | 62 }; |
60 | 63 |
61 } // namespace google_util | 64 } // namespace google_util |
62 | 65 |
63 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ | 66 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_H__ |
OLD | NEW |