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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 namespace net { | 32 namespace net { |
33 class URLFetcher; | 33 class URLFetcher; |
34 } | 34 } |
35 | 35 |
36 namespace user_prefs { | 36 namespace user_prefs { |
37 class PrefRegistrySyncable; | 37 class PrefRegistrySyncable; |
38 } | 38 } |
39 | 39 |
40 // This test is in global namespace so it must be declared here. | |
41 void Test__InitStartupCustomizationDocument(const std::string& manifest); | |
42 | |
43 namespace chromeos { | 40 namespace chromeos { |
44 | 41 |
45 class CustomizationWallpaperDownloader; | 42 class CustomizationWallpaperDownloader; |
46 class ServicesCustomizationExternalLoader; | 43 class ServicesCustomizationExternalLoader; |
47 | 44 |
| 45 void InitStartupCustomizationDocumentForTesting(const std::string& manifest); |
| 46 |
48 namespace system { | 47 namespace system { |
49 class StatisticsProvider; | 48 class StatisticsProvider; |
50 } // system | 49 } // system |
51 | 50 |
52 // Base class for OEM customization document classes. | 51 // Base class for OEM customization document classes. |
53 class CustomizationDocument { | 52 class CustomizationDocument { |
54 public: | 53 public: |
55 virtual ~CustomizationDocument(); | 54 virtual ~CustomizationDocument(); |
56 | 55 |
57 // Return true if the document was successfully fetched and parsed. | 56 // Return true if the document was successfully fetched and parsed. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const std::string& initial_locale_default() const; | 99 const std::string& initial_locale_default() const; |
101 const std::string& initial_timezone() const { return initial_timezone_; } | 100 const std::string& initial_timezone() const { return initial_timezone_; } |
102 const std::string& keyboard_layout() const { return keyboard_layout_; } | 101 const std::string& keyboard_layout() const { return keyboard_layout_; } |
103 | 102 |
104 private: | 103 private: |
105 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, Basic); | 104 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, Basic); |
106 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, VPD); | 105 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, VPD); |
107 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, BadManifest); | 106 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, BadManifest); |
108 FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, MultiLanguage); | 107 FRIEND_TEST_ALL_PREFIXES(ServicesCustomizationDocumentTest, MultiLanguage); |
109 friend class OobeLocalizationTest; | 108 friend class OobeLocalizationTest; |
110 friend void ::Test__InitStartupCustomizationDocument( | 109 friend void InitStartupCustomizationDocumentForTesting( |
111 const std::string& manifest); | 110 const std::string& manifest); |
112 friend struct DefaultSingletonTraits<StartupCustomizationDocument>; | 111 friend struct DefaultSingletonTraits<StartupCustomizationDocument>; |
113 | 112 |
114 // C-tor for singleton construction. | 113 // C-tor for singleton construction. |
115 StartupCustomizationDocument(); | 114 StartupCustomizationDocument(); |
116 | 115 |
117 // C-tor for test construction. | 116 // C-tor for test construction. |
118 StartupCustomizationDocument(system::StatisticsProvider* provider, | 117 StartupCustomizationDocument(system::StatisticsProvider* provider, |
119 const std::string& manifest); | 118 const std::string& manifest); |
120 | 119 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 325 |
327 // Weak factory for callbacks. | 326 // Weak factory for callbacks. |
328 base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_; | 327 base::WeakPtrFactory<ServicesCustomizationDocument> weak_ptr_factory_; |
329 | 328 |
330 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); | 329 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); |
331 }; | 330 }; |
332 | 331 |
333 } // namespace chromeos | 332 } // namespace chromeos |
334 | 333 |
335 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ | 334 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ |
OLD | NEW |