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_EXTENSIONS_STATE_STORE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Sets a value for a given extension and key. | 46 // Sets a value for a given extension and key. |
47 void SetExtensionValue(const std::string& extension_id, | 47 void SetExtensionValue(const std::string& extension_id, |
48 const std::string& key, | 48 const std::string& key, |
49 scoped_ptr<base::Value> value); | 49 scoped_ptr<base::Value> value); |
50 | 50 |
51 // Removes a value for a given extension and key. | 51 // Removes a value for a given extension and key. |
52 void RemoveExtensionValue(const std::string& extension_id, | 52 void RemoveExtensionValue(const std::string& extension_id, |
53 const std::string& key); | 53 const std::string& key); |
54 | 54 |
| 55 // Return whether or not the StateStore has initialized itself. |
| 56 bool IsInitialized() const; |
| 57 |
55 private: | 58 private: |
56 class DelayedTaskQueue; | 59 class DelayedTaskQueue; |
57 | 60 |
58 // content::NotificationObserver | 61 // content::NotificationObserver |
59 virtual void Observe(int type, | 62 virtual void Observe(int type, |
60 const content::NotificationSource& source, | 63 const content::NotificationSource& source, |
61 const content::NotificationDetails& details) OVERRIDE; | 64 const content::NotificationDetails& details) OVERRIDE; |
62 | 65 |
63 void Init(); | 66 void Init(); |
64 | 67 |
(...skipping 12 matching lines...) Expand all Loading... |
77 | 80 |
78 // Keeps track of tasks we have delayed while starting up. | 81 // Keeps track of tasks we have delayed while starting up. |
79 scoped_ptr<DelayedTaskQueue> task_queue_; | 82 scoped_ptr<DelayedTaskQueue> task_queue_; |
80 | 83 |
81 content::NotificationRegistrar registrar_; | 84 content::NotificationRegistrar registrar_; |
82 }; | 85 }; |
83 | 86 |
84 } // namespace extensions | 87 } // namespace extensions |
85 | 88 |
86 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ | 89 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ |
OLD | NEW |