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 #ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 }; | 57 }; |
58 | 58 |
59 // OEM startup customization document class. | 59 // OEM startup customization document class. |
60 // Now StartupCustomizationDocument is loaded in c-tor so just after create it | 60 // Now StartupCustomizationDocument is loaded in c-tor so just after create it |
61 // may be ready or not (if manifest is missing or corrupted) and this state | 61 // may be ready or not (if manifest is missing or corrupted) and this state |
62 // won't be changed later (i.e. IsReady() always return the same value). | 62 // won't be changed later (i.e. IsReady() always return the same value). |
63 class StartupCustomizationDocument : public CustomizationDocument { | 63 class StartupCustomizationDocument : public CustomizationDocument { |
64 public: | 64 public: |
65 static StartupCustomizationDocument* GetInstance(); | 65 static StartupCustomizationDocument* GetInstance(); |
66 | 66 |
67 const std::string& initial_locale() const { return initial_locale_; } | |
68 const std::string& initial_timezone() const { return initial_timezone_; } | |
69 const std::string& keyboard_layout() const { return keyboard_layout_; } | |
70 const std::string& registration_url() const { return registration_url_; } | |
71 | |
72 std::string GetHelpPage(const std::string& locale) const; | 67 std::string GetHelpPage(const std::string& locale) const; |
73 std::string GetEULAPage(const std::string& locale) const; | 68 std::string GetEULAPage(const std::string& locale) const; |
74 | 69 |
70 const std::string& registration_url() const { return registration_url_; } | |
71 | |
72 // These methods can be called even if !IsReady() in this case VPD values | |
whywhat
2011/08/16 08:01:24
nit: comma or period after IsReady()
Dmitry Polukhin
2011/08/16 08:29:51
Done.
| |
73 // will be returned. | |
74 const std::string& initial_locale() const { return initial_locale_; } | |
75 const std::string& initial_timezone() const { return initial_timezone_; } | |
76 const std::string& keyboard_layout() const { return keyboard_layout_; } | |
77 | |
75 private: | 78 private: |
76 FRIEND_TEST(StartupCustomizationDocumentTest, Basic); | 79 FRIEND_TEST(StartupCustomizationDocumentTest, Basic); |
whywhat
2011/08/16 08:01:24
Could you replace with FRIEND_TEST_ALL_PREFIXES?
Dmitry Polukhin
2011/08/16 08:29:51
Done.
| |
77 FRIEND_TEST(StartupCustomizationDocumentTest, VPD); | 80 FRIEND_TEST(StartupCustomizationDocumentTest, VPD); |
78 FRIEND_TEST(StartupCustomizationDocumentTest, BadManifest); | 81 FRIEND_TEST(StartupCustomizationDocumentTest, BadManifest); |
79 friend struct DefaultSingletonTraits<StartupCustomizationDocument>; | 82 friend struct DefaultSingletonTraits<StartupCustomizationDocument>; |
80 | 83 |
81 // C-tor for singleton construction. | 84 // C-tor for singleton construction. |
82 StartupCustomizationDocument(); | 85 StartupCustomizationDocument(); |
83 | 86 |
84 // C-tor for test construction. | 87 // C-tor for test construction. |
85 StartupCustomizationDocument(system::StatisticsProvider* provider, | 88 StartupCustomizationDocument(system::StatisticsProvider* provider, |
86 const std::string& manifest); | 89 const std::string& manifest); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 | 222 |
220 // Initial locale value. | 223 // Initial locale value. |
221 std::string initial_locale_; | 224 std::string initial_locale_; |
222 | 225 |
223 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); | 226 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); |
224 }; | 227 }; |
225 | 228 |
226 } // namespace chromeos | 229 } // namespace chromeos |
227 | 230 |
228 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 231 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
OLD | NEW |