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

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

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years 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
OLDNEW
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 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "net/url_request/url_fetcher_delegate.h" 17 #include "net/url_request/url_fetcher_delegate.h"
18 18
19 class FilePath; 19 class FilePath;
20 class PrefService; 20 class PrefServiceSimple;
21 21
22 namespace base { 22 namespace base {
23 class DictionaryValue; 23 class DictionaryValue;
24 } 24 }
25 25
26 namespace net { 26 namespace net {
27 class URLFetcher; 27 class URLFetcher;
28 } 28 }
29 29
30 namespace chromeos { 30 namespace chromeos {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // ServicesCustomizationDocument is fetched from network or local file but on 112 // ServicesCustomizationDocument is fetched from network or local file but on
113 // FILE thread therefore it may not be ready just after creation. Fetching of 113 // FILE thread therefore it may not be ready just after creation. Fetching of
114 // the manifest should be initiated outside this class by calling 114 // the manifest should be initiated outside this class by calling
115 // StartFetching() method. User of the file should check IsReady before use it. 115 // StartFetching() method. User of the file should check IsReady before use it.
116 class ServicesCustomizationDocument : public CustomizationDocument, 116 class ServicesCustomizationDocument : public CustomizationDocument,
117 private net::URLFetcherDelegate { 117 private net::URLFetcherDelegate {
118 public: 118 public:
119 static ServicesCustomizationDocument* GetInstance(); 119 static ServicesCustomizationDocument* GetInstance();
120 120
121 // Registers preferences. 121 // Registers preferences.
122 static void RegisterPrefs(PrefService* local_state); 122 static void RegisterPrefs(PrefServiceSimple* local_state);
123 123
124 // Return true if the customization was applied. Customization is applied only 124 // Return true if the customization was applied. Customization is applied only
125 // once per machine. 125 // once per machine.
126 static bool WasApplied(); 126 static bool WasApplied();
127 127
128 // Start fetching customization document. 128 // Start fetching customization document.
129 void StartFetching(); 129 void StartFetching();
130 130
131 // Apply customization and save in machine options that customization was 131 // Apply customization and save in machine options that customization was
132 // applied successfully. Return true if customization was applied. 132 // applied successfully. Return true if customization was applied.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 // How many times we already tried to fetch customization manifest file. 172 // How many times we already tried to fetch customization manifest file.
173 int num_retries_; 173 int num_retries_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument); 175 DISALLOW_COPY_AND_ASSIGN(ServicesCustomizationDocument);
176 }; 176 };
177 177
178 } // namespace chromeos 178 } // namespace chromeos
179 179
180 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_ 180 #endif // CHROME_BROWSER_CHROMEOS_CUSTOMIZATION_DOCUMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698