| 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 15 matching lines...) Expand all Loading... |
| 26 #include "extensions/browser/image_loader.h" | 26 #include "extensions/browser/image_loader.h" |
| 27 #include "extensions/browser/uninstall_reason.h" | 27 #include "extensions/browser/uninstall_reason.h" |
| 28 #include "extensions/common/extension.h" | 28 #include "extensions/common/extension.h" |
| 29 #include "extensions/common/manifest_handlers/icons_handler.h" | 29 #include "extensions/common/manifest_handlers/icons_handler.h" |
| 30 #include "extensions/common/permissions/permissions_data.h" | 30 #include "extensions/common/permissions/permissions_data.h" |
| 31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
| 33 #include "ui/message_center/message_center.h" | 33 #include "ui/message_center/message_center.h" |
| 34 #include "ui/message_center/notifier_settings.h" | 34 #include "ui/message_center/notifier_settings.h" |
| 35 #include "ui/message_center/views/constants.h" | 35 #include "ui/message_center/views/constants.h" |
| 36 #include "webkit/browser/quota/quota_manager.h" | 36 #include "storage/browser/quota/quota_manager.h" |
| 37 #include "webkit/browser/quota/storage_observer.h" | 37 #include "storage/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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 void ExtensionStorageMonitor::SetStorageNotificationEnabled( | 612 void ExtensionStorageMonitor::SetStorageNotificationEnabled( |
| 613 const std::string& extension_id, | 613 const std::string& extension_id, |
| 614 bool enable_notifications) { | 614 bool enable_notifications) { |
| 615 extension_prefs_->UpdateExtensionPref( | 615 extension_prefs_->UpdateExtensionPref( |
| 616 extension_id, | 616 extension_id, |
| 617 kPrefDisableStorageNotifications, | 617 kPrefDisableStorageNotifications, |
| 618 enable_notifications ? NULL : new base::FundamentalValue(true)); | 618 enable_notifications ? NULL : new base::FundamentalValue(true)); |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace extensions | 621 } // namespace extensions |
| OLD | NEW |