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

Side by Side Diff: extensions/browser/state_store.h

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 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
« no previous file with comments | « extensions/browser/extension_registry_unittest.cc ('k') | extensions/browser/state_store.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void Observe(int type, 69 virtual void Observe(int type,
70 const content::NotificationSource& source, 70 const content::NotificationSource& source,
71 const content::NotificationDetails& details) OVERRIDE; 71 const content::NotificationDetails& details) OVERRIDE;
72 72
73 void Init(); 73 void Init();
74 74
75 // Removes all keys registered for the given extension. 75 // Removes all keys registered for the given extension.
76 void RemoveKeysForExtension(const std::string& extension_id); 76 void RemoveKeysForExtension(const std::string& extension_id);
77 77
78 // ExtensionRegistryObserver implementation. 78 // ExtensionRegistryObserver implementation.
79 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, 79 virtual void OnExtensionUninstalled(
80 const Extension* extension) OVERRIDE; 80 content::BrowserContext* browser_context,
81 const Extension* extension,
82 extensions::UninstallReason reason) OVERRIDE;
81 virtual void OnExtensionWillBeInstalled( 83 virtual void OnExtensionWillBeInstalled(
82 content::BrowserContext* browser_context, 84 content::BrowserContext* browser_context,
83 const Extension* extension, 85 const Extension* extension,
84 bool is_update, 86 bool is_update,
85 bool from_ephemeral, 87 bool from_ephemeral,
86 const std::string& old_name) OVERRIDE; 88 const std::string& old_name) OVERRIDE;
87 89
88 // Path to our database, on disk. Empty during testing. 90 // Path to our database, on disk. Empty during testing.
89 base::FilePath db_path_; 91 base::FilePath db_path_;
90 92
91 // The store that holds our key/values. 93 // The store that holds our key/values.
92 ValueStoreFrontend store_; 94 ValueStoreFrontend store_;
93 95
94 // List of all known keys. They will be cleared for each extension when it is 96 // List of all known keys. They will be cleared for each extension when it is
95 // (un)installed. 97 // (un)installed.
96 std::set<std::string> registered_keys_; 98 std::set<std::string> registered_keys_;
97 99
98 // Keeps track of tasks we have delayed while starting up. 100 // Keeps track of tasks we have delayed while starting up.
99 scoped_ptr<DelayedTaskQueue> task_queue_; 101 scoped_ptr<DelayedTaskQueue> task_queue_;
100 102
101 content::NotificationRegistrar registrar_; 103 content::NotificationRegistrar registrar_;
102 104
103 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 105 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
104 extension_registry_observer_; 106 extension_registry_observer_;
105 }; 107 };
106 108
107 } // namespace extensions 109 } // namespace extensions
108 110
109 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_ 111 #endif // CHROME_BROWSER_EXTENSIONS_STATE_STORE_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_registry_unittest.cc ('k') | extensions/browser/state_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698