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

Side by Side Diff: chrome/browser/extensions/install_tracker.h

Issue 279073003: Add a function triggering extension installed to ExtensionRegistryObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 #include "base/scoped_observer.h" 10 #include "base/scoped_observer.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void OnBeginCrxInstall(const std::string& extension_id); 46 void OnBeginCrxInstall(const std::string& extension_id);
47 void OnFinishCrxInstall(const std::string& extension_id, bool success); 47 void OnFinishCrxInstall(const std::string& extension_id, bool success);
48 void OnInstallFailure(const std::string& extension_id); 48 void OnInstallFailure(const std::string& extension_id);
49 49
50 // Overriddes for KeyedService. 50 // Overriddes for KeyedService.
51 virtual void Shutdown() OVERRIDE; 51 virtual void Shutdown() OVERRIDE;
52 52
53 private: 53 private:
54 void OnAppsReordered(); 54 void OnAppsReordered();
55 55
56 // content::NotificationObserver. 56 // content::NotificationObserver implementation.
57 virtual void Observe(int type, 57 virtual void Observe(int type,
58 const content::NotificationSource& source, 58 const content::NotificationSource& source,
59 const content::NotificationDetails& details) OVERRIDE; 59 const content::NotificationDetails& details) OVERRIDE;
60 60
61 // ExtensionRegistryObserver implementation. 61 // ExtensionRegistryObserver implementation.
62 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, 62 virtual void OnExtensionLoaded(content::BrowserContext* browser_context,
63 const Extension* extension) OVERRIDE; 63 const Extension* extension) OVERRIDE;
64 virtual void OnExtensionUnloaded( 64 virtual void OnExtensionUnloaded(
65 content::BrowserContext* browser_context, 65 content::BrowserContext* browser_context,
66 const Extension* extension, 66 const Extension* extension,
67 UnloadedExtensionInfo::Reason reason) OVERRIDE; 67 UnloadedExtensionInfo::Reason reason) OVERRIDE;
68 virtual void OnExtensionInstalled(content::BrowserContext* browser_context,
69 const Extension* extension,
70 InstalledExtensionInfo info) OVERRIDE;
not at google - send to devlin 2014/05/14 18:17:50 (note that this should be a const InstalledExtensi
limasdf 2014/05/16 01:02:35 (Yep. Thank you)
68 71
69 ObserverList<InstallObserver> observers_; 72 ObserverList<InstallObserver> observers_;
70 content::NotificationRegistrar registrar_; 73 content::NotificationRegistrar registrar_;
71 PrefChangeRegistrar pref_change_registrar_; 74 PrefChangeRegistrar pref_change_registrar_;
72 75
73 // Listen to extension load, unloaded notifications.
74 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 76 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
75 extension_registry_observer_; 77 extension_registry_observer_;
76 78
77 DISALLOW_COPY_AND_ASSIGN(InstallTracker); 79 DISALLOW_COPY_AND_ASSIGN(InstallTracker);
78 }; 80 };
79 81
80 } // namespace extensions 82 } // namespace extensions
81 83
82 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_ 84 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698