Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: chrome/browser/chromeos/customization_document.h

Issue 7659009: Apply VPD customization even if startup customization manifest is missing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/customization_document.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_ALL_PREFIXES(StartupCustomizationDocumentTest, Basic);
77 FRIEND_TEST(StartupCustomizationDocumentTest, VPD); 80 FRIEND_TEST_ALL_PREFIXES(StartupCustomizationDocumentTest, VPD);
78 FRIEND_TEST(StartupCustomizationDocumentTest, BadManifest); 81 FRIEND_TEST_ALL_PREFIXES(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);
87 90
88 virtual ~StartupCustomizationDocument(); 91 virtual ~StartupCustomizationDocument();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/customization_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698