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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/operation_manager.cc

Issue 204703002: Rename NOTIFICATION_EXTENSION_UNLOADED to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: maybe upload wont do something bizarre this time Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/lazy_instance.h" 5 #include "base/lazy_instance.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/api/image_writer_private/destroy_partitions_ operation.h" 8 #include "chrome/browser/extensions/api/image_writer_private/destroy_partitions_ operation.h"
9 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h" 9 #include "chrome/browser/extensions/api/image_writer_private/error_messages.h"
10 #include "chrome/browser/extensions/api/image_writer_private/operation.h" 10 #include "chrome/browser/extensions/api/image_writer_private/operation.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace extensions { 25 namespace extensions {
26 namespace image_writer { 26 namespace image_writer {
27 27
28 using content::BrowserThread; 28 using content::BrowserThread;
29 29
30 OperationManager::OperationManager(content::BrowserContext* context) 30 OperationManager::OperationManager(content::BrowserContext* context)
31 : profile_(Profile::FromBrowserContext(context)), weak_factory_(this) { 31 : profile_(Profile::FromBrowserContext(context)), weak_factory_(this) {
32 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 32 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
33 content::Source<Profile>(profile_)); 33 content::Source<Profile>(profile_));
34 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 34 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
35 content::Source<Profile>(profile_)); 35 content::Source<Profile>(profile_));
36 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 36 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
37 content::Source<Profile>(profile_)); 37 content::Source<Profile>(profile_));
38 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, 38 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE,
39 content::Source<Profile>(profile_)); 39 content::Source<Profile>(profile_));
40 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED, 40 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
41 content::Source<Profile>(profile_)); 41 content::Source<Profile>(profile_));
42 } 42 }
43 43
44 OperationManager::~OperationManager() { 44 OperationManager::~OperationManager() {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 void OperationManager::Observe(int type, 208 void OperationManager::Observe(int type,
209 const content::NotificationSource& source, 209 const content::NotificationSource& source,
210 const content::NotificationDetails& details) { 210 const content::NotificationDetails& details) {
211 switch (type) { 211 switch (type) {
212 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { 212 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
213 DeleteOperation(content::Details<const Extension>(details).ptr()->id()); 213 DeleteOperation(content::Details<const Extension>(details).ptr()->id());
214 break; 214 break;
215 } 215 }
216 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { 216 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
217 DeleteOperation(content::Details<const Extension>(details).ptr()->id()); 217 DeleteOperation(content::Details<const Extension>(details).ptr()->id());
218 break; 218 break;
219 } 219 }
220 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: { 220 case chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED: {
221 DeleteOperation(content::Details<const Extension>(details).ptr()->id()); 221 DeleteOperation(content::Details<const Extension>(details).ptr()->id());
222 break; 222 break;
223 } 223 }
224 case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: { 224 case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: {
225 DeleteOperation( 225 DeleteOperation(
226 content::Details<ExtensionHost>(details)->extension()->id()); 226 content::Details<ExtensionHost>(details)->extension()->id());
(...skipping 19 matching lines...) Expand all
246 g_factory = LAZY_INSTANCE_INITIALIZER; 246 g_factory = LAZY_INSTANCE_INITIALIZER;
247 247
248 BrowserContextKeyedAPIFactory<OperationManager>* 248 BrowserContextKeyedAPIFactory<OperationManager>*
249 OperationManager::GetFactoryInstance() { 249 OperationManager::GetFactoryInstance() {
250 return g_factory.Pointer(); 250 return g_factory.Pointer();
251 } 251 }
252 252
253 253
254 } // namespace image_writer 254 } // namespace image_writer
255 } // namespace extensions 255 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/idle/idle_manager.cc ('k') | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698