Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ | 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 | 11 |
| 12 namespace google_util { | 12 namespace google_util { |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 | 14 |
| 15 // Returns the brand code stored in Local State that has been assigned to a | 15 // Returns the brand code stored in Local State that has been assigned to a |
| 16 // partner. Returns empty string if the information is not available. | 16 // partner. Returns empty string if the information is not available. |
| 17 std::string GetBrand(); | 17 std::string GetBrand(); |
| 18 | 18 |
| 19 // Sets brand for current session only, i.e. not persisted through browser | |
| 20 // restart. Future calls to GetBrand() will return |brand|. | |
| 21 void SetBrandForCurrentSession(const std::string& brand); | |
|
Ilya Sherman
2012/12/15 00:57:16
It looks like you only ever use this method to set
Ivan Korotkov
2012/12/17 09:05:01
Makes sense. I wanted to be as generic as possible
| |
| 22 | |
| 19 // Reads the brand code from a board-specific file and stores it to Local State. | 23 // Reads the brand code from a board-specific file and stores it to Local State. |
| 20 // |callback| is invoked on the calling thread after that. | 24 // |callback| is invoked on the calling thread after that. |
| 21 void SetBrandFromFile(const base::Closure& callback); | 25 void SetBrandFromFile(const base::Closure& callback); |
| 22 | 26 |
| 23 } // namespace chromeos | 27 } // namespace chromeos |
| 24 } // namespace google_util | 28 } // namespace google_util |
| 25 | 29 |
| 26 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ | 30 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_UTIL_CHROMEOS_H_ |
| OLD | NEW |