OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This namespace provides various helpers and state relating to Google Chrome | 5 // This namespace provides various helpers and state relating to Google Chrome |
6 // distributions (such as RLZ), and specifically relating to the brand of the | 6 // distributions (such as RLZ), and specifically relating to the brand of the |
7 // current install. Brands are codes that are assigned to partners for tracking | 7 // current install. Brands are codes that are assigned to partners for tracking |
8 // distribution information. | 8 // distribution information. |
9 | 9 |
10 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ | 10 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ |
11 #define CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ | 11 #define CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/macros.h" |
16 | 16 |
17 class GURL; | 17 class GURL; |
18 | 18 |
19 namespace google_brand { | 19 namespace google_brand { |
20 | 20 |
21 // Returns in |brand| the brand code or distribution tag that has been | 21 // Returns in |brand| the brand code or distribution tag that has been |
22 // assigned to a partner. Returns false if the information is not available. | 22 // assigned to a partner. Returns false if the information is not available. |
23 bool GetBrand(std::string* brand); | 23 bool GetBrand(std::string* brand); |
24 | 24 |
25 // Returns in |brand| the reactivation brand code or distribution tag | 25 // Returns in |brand| the reactivation brand code or distribution tag |
(...skipping 14 matching lines...) Expand all Loading... |
40 | 40 |
41 // This class is meant to be used only from test code, and sets the brand | 41 // This class is meant to be used only from test code, and sets the brand |
42 // code returned by the function GetBrand() above while the object exists. | 42 // code returned by the function GetBrand() above while the object exists. |
43 class BrandForTesting { | 43 class BrandForTesting { |
44 public: | 44 public: |
45 explicit BrandForTesting(const std::string& brand); | 45 explicit BrandForTesting(const std::string& brand); |
46 ~BrandForTesting(); | 46 ~BrandForTesting(); |
47 | 47 |
48 private: | 48 private: |
49 std::string brand_; | 49 std::string brand_; |
| 50 |
50 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); | 51 DISALLOW_COPY_AND_ASSIGN(BrandForTesting); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace google_brand | 54 } // namespace google_brand |
54 | 55 |
55 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ | 56 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_BRAND_H__ |
OLD | NEW |