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 | |
58 private: | 55 private: |
59 class DelayedTaskQueue; | 56 class DelayedTaskQueue; |
60 | 57 |
61 // content::NotificationObserver | 58 // content::NotificationObserver |
62 virtual void Observe(int type, | 59 virtual void Observe(int type, |
63 const content::NotificationSource& source, | 60 const content::NotificationSource& source, |
64 const content::NotificationDetails& details) OVERRIDE; | 61 const content::NotificationDetails& details) OVERRIDE; |
65 | 62 |
66 void Init(); | 63 void Init(); |
67 | 64 |
(...skipping 12 matching lines...) Expand all Loading... |
80 | 77 |
81 // Keeps track of tasks we have delayed while starting up. | 78 // Keeps track of tasks we have delayed while starting up. |
82 scoped_ptr<DelayedTaskQueue> task_queue_; | 79 scoped_ptr<DelayedTaskQueue> task_queue_; |
83 | 80 |
84 content::NotificationRegistrar registrar_; | 81 content::NotificationRegistrar registrar_; |
85 }; | 82 }; |
86 | 83 |
87 } // namespace extensions | 84 } // namespace extensions |
88 | 85 |
89 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ | 86 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ |
OLD | NEW |