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 "chrome/browser/extensions/extension_storage_monitor.h" | 5 #include "chrome/browser/extensions/extension_storage_monitor.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
23 #include "content/public/browser/storage_partition.h" | 23 #include "content/public/browser/storage_partition.h" |
24 #include "extensions/browser/extension_prefs.h" | 24 #include "extensions/browser/extension_prefs.h" |
25 #include "extensions/browser/extension_registry.h" | 25 #include "extensions/browser/extension_registry.h" |
26 #include "extensions/browser/extension_system.h" | 26 #include "extensions/browser/extension_system.h" |
27 #include "extensions/browser/image_loader.h" | 27 #include "extensions/browser/image_loader.h" |
28 #include "extensions/browser/uninstall_reason.h" | 28 #include "extensions/browser/uninstall_reason.h" |
29 #include "extensions/common/extension.h" | 29 #include "extensions/common/extension.h" |
30 #include "extensions/common/manifest_handlers/icons_handler.h" | 30 #include "extensions/common/manifest_handlers/icons_handler.h" |
31 #include "extensions/common/permissions/permissions_data.h" | 31 #include "extensions/common/permissions/permissions_data.h" |
| 32 #include "storage/browser/quota/quota_manager.h" |
| 33 #include "storage/browser/quota/storage_observer.h" |
32 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/message_center/message_center.h" | 35 #include "ui/message_center/message_center.h" |
34 #include "ui/message_center/notifier_settings.h" | 36 #include "ui/message_center/notifier_settings.h" |
35 #include "ui/message_center/views/constants.h" | 37 #include "ui/message_center/views/constants.h" |
36 #include "webkit/browser/quota/quota_manager.h" | |
37 #include "webkit/browser/quota/storage_observer.h" | |
38 | 38 |
39 using content::BrowserThread; | 39 using content::BrowserThread; |
40 | 40 |
41 namespace extensions { | 41 namespace extensions { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 // The rate at which we would like to observe storage events. | 45 // The rate at which we would like to observe storage events. |
46 const int kStorageEventRateSec = 30; | 46 const int kStorageEventRateSec = 30; |
47 | 47 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 void ExtensionStorageMonitor::SetStorageNotificationEnabled( | 609 void ExtensionStorageMonitor::SetStorageNotificationEnabled( |
610 const std::string& extension_id, | 610 const std::string& extension_id, |
611 bool enable_notifications) { | 611 bool enable_notifications) { |
612 extension_prefs_->UpdateExtensionPref( | 612 extension_prefs_->UpdateExtensionPref( |
613 extension_id, | 613 extension_id, |
614 kPrefDisableStorageNotifications, | 614 kPrefDisableStorageNotifications, |
615 enable_notifications ? NULL : new base::FundamentalValue(true)); | 615 enable_notifications ? NULL : new base::FundamentalValue(true)); |
616 } | 616 } |
617 | 617 |
618 } // namespace extensions | 618 } // namespace extensions |
OLD | NEW |