OLD | NEW |
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 #include "extensions/browser/state_store.h" | 5 #include "extensions/browser/state_store.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 const content::NotificationDetails& details) { | 142 const content::NotificationDetails& details) { |
143 DCHECK_EQ(type, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); | 143 DCHECK_EQ(type, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); |
144 registrar_.RemoveAll(); | 144 registrar_.RemoveAll(); |
145 InitAfterDelay(); | 145 InitAfterDelay(); |
146 } | 146 } |
147 | 147 |
148 void StateStore::OnExtensionWillBeInstalled( | 148 void StateStore::OnExtensionWillBeInstalled( |
149 content::BrowserContext* browser_context, | 149 content::BrowserContext* browser_context, |
150 const Extension* extension, | 150 const Extension* extension, |
151 bool is_update, | 151 bool is_update, |
152 bool from_ephemeral, | |
153 const std::string& old_name) { | 152 const std::string& old_name) { |
154 RemoveKeysForExtension(extension->id()); | 153 RemoveKeysForExtension(extension->id()); |
155 } | 154 } |
156 | 155 |
157 void StateStore::OnExtensionUninstalled( | 156 void StateStore::OnExtensionUninstalled( |
158 content::BrowserContext* browser_context, | 157 content::BrowserContext* browser_context, |
159 const Extension* extension, | 158 const Extension* extension, |
160 extensions::UninstallReason reason) { | 159 extensions::UninstallReason reason) { |
161 RemoveKeysForExtension(extension->id()); | 160 RemoveKeysForExtension(extension->id()); |
162 } | 161 } |
(...skipping 23 matching lines...) Expand all Loading... |
186 for (std::set<std::string>::iterator key = registered_keys_.begin(); | 185 for (std::set<std::string>::iterator key = registered_keys_.begin(); |
187 key != registered_keys_.end(); | 186 key != registered_keys_.end(); |
188 ++key) { | 187 ++key) { |
189 task_queue_->InvokeWhenReady(base::Bind(&ValueStoreFrontend::Remove, | 188 task_queue_->InvokeWhenReady(base::Bind(&ValueStoreFrontend::Remove, |
190 base::Unretained(&store_), | 189 base::Unretained(&store_), |
191 GetFullKey(extension_id, *key))); | 190 GetFullKey(extension_id, *key))); |
192 } | 191 } |
193 } | 192 } |
194 | 193 |
195 } // namespace extensions | 194 } // namespace extensions |
OLD | NEW |