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

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

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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_EXTENSION_STORAGE_MONITOR_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_STORAGE_MONITOR_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_STORAGE_MONITOR_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_STORAGE_MONITOR_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 30 matching lines...) Expand all
41 public: 41 public:
42 static ExtensionStorageMonitor* Get(content::BrowserContext* context); 42 static ExtensionStorageMonitor* Get(content::BrowserContext* context);
43 43
44 // Indices of buttons in the notification. Exposed for testing. 44 // Indices of buttons in the notification. Exposed for testing.
45 enum ButtonIndex { 45 enum ButtonIndex {
46 BUTTON_DISABLE_NOTIFICATION = 0, 46 BUTTON_DISABLE_NOTIFICATION = 0,
47 BUTTON_UNINSTALL 47 BUTTON_UNINSTALL
48 }; 48 };
49 49
50 explicit ExtensionStorageMonitor(content::BrowserContext* context); 50 explicit ExtensionStorageMonitor(content::BrowserContext* context);
51 virtual ~ExtensionStorageMonitor(); 51 ~ExtensionStorageMonitor() override;
52 52
53 private: 53 private:
54 // content::NotificationObserver overrides: 54 // content::NotificationObserver overrides:
55 virtual void Observe(int type, 55 void Observe(int type,
56 const content::NotificationSource& source, 56 const content::NotificationSource& source,
57 const content::NotificationDetails& details) override; 57 const content::NotificationDetails& details) override;
58 58
59 // ExtensionRegistryObserver overrides: 59 // ExtensionRegistryObserver overrides:
60 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, 60 void OnExtensionLoaded(content::BrowserContext* browser_context,
61 const Extension* extension) override; 61 const Extension* extension) override;
62 virtual void OnExtensionUnloaded( 62 void OnExtensionUnloaded(content::BrowserContext* browser_context,
63 content::BrowserContext* browser_context, 63 const Extension* extension,
64 const Extension* extension, 64 UnloadedExtensionInfo::Reason reason) override;
65 UnloadedExtensionInfo::Reason reason) override; 65 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context,
66 virtual void OnExtensionWillBeInstalled( 66 const Extension* extension,
67 content::BrowserContext* browser_context, 67 bool is_update,
68 const Extension* extension, 68 bool from_ephemeral,
69 bool is_update, 69 const std::string& old_name) override;
70 bool from_ephemeral, 70 void OnExtensionUninstalled(content::BrowserContext* browser_context,
71 const std::string& old_name) override; 71 const Extension* extension,
72 virtual void OnExtensionUninstalled( 72 extensions::UninstallReason reason) override;
73 content::BrowserContext* browser_context,
74 const Extension* extension,
75 extensions::UninstallReason reason) override;
76 73
77 // Overridden from ExtensionUninstallDialog::Delegate: 74 // Overridden from ExtensionUninstallDialog::Delegate:
78 virtual void ExtensionUninstallAccepted() override; 75 void ExtensionUninstallAccepted() override;
79 virtual void ExtensionUninstallCanceled() override; 76 void ExtensionUninstallCanceled() override;
80 77
81 std::string GetNotificationId(const std::string& extension_id); 78 std::string GetNotificationId(const std::string& extension_id);
82 79
83 void OnStorageThresholdExceeded(const std::string& extension_id, 80 void OnStorageThresholdExceeded(const std::string& extension_id,
84 int64 next_threshold, 81 int64 next_threshold,
85 int64 current_usage); 82 int64 current_usage);
86 void OnImageLoaded(const std::string& extension_id, 83 void OnImageLoaded(const std::string& extension_id,
87 int64 current_usage, 84 int64 current_usage,
88 const gfx::Image& image); 85 const gfx::Image& image);
89 void OnNotificationButtonClick(const std::string& extension_id, 86 void OnNotificationButtonClick(const std::string& extension_id,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 152
156 friend class StorageEventObserver; 153 friend class StorageEventObserver;
157 friend class ExtensionStorageMonitorTest; 154 friend class ExtensionStorageMonitorTest;
158 155
159 DISALLOW_COPY_AND_ASSIGN(ExtensionStorageMonitor); 156 DISALLOW_COPY_AND_ASSIGN(ExtensionStorageMonitor);
160 }; 157 };
161 158
162 } // namespace extensions 159 } // namespace extensions
163 160
164 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_STORAGE_MONITOR_H_ 161 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_STORAGE_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | chrome/browser/extensions/extension_storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698