| OLD | NEW |
| 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 "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" | 5 #include "chrome/browser/extensions/api/declarative/rules_cache_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/extensions/api/declarative/rules_registry.h" | 8 #include "chrome/browser/extensions/api/declarative/rules_registry.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | |
| 11 #include "chrome/browser/extensions/extension_util.h" | 10 #include "chrome/browser/extensions/extension_util.h" |
| 12 #include "chrome/browser/extensions/state_store.h" | 11 #include "chrome/browser/extensions/state_store.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 14 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
| 15 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
| 15 #include "extensions/browser/extension_system.h" |
| 16 #include "extensions/browser/info_map.h" | 16 #include "extensions/browser/info_map.h" |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Returns the key to use for storing declarative rules in the state store. | 20 // Returns the key to use for storing declarative rules in the state store. |
| 21 std::string GetDeclarativeRuleStorageKey(const std::string& event_name, | 21 std::string GetDeclarativeRuleStorageKey(const std::string& event_name, |
| 22 bool incognito) { | 22 bool incognito) { |
| 23 if (incognito) | 23 if (incognito) |
| 24 return "declarative_rules.incognito." + event_name; | 24 return "declarative_rules.incognito." + event_name; |
| 25 else | 25 else |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 DCHECK(extension_service); | 218 DCHECK(extension_service); |
| 219 DCHECK(extension_service->GetInstalledExtension(extension_id)); | 219 DCHECK(extension_service->GetInstalledExtension(extension_id)); |
| 220 ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(profile_); | 220 ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(profile_); |
| 221 extension_prefs->UpdateExtensionPref( | 221 extension_prefs->UpdateExtensionPref( |
| 222 extension_id, | 222 extension_id, |
| 223 rules_stored_key_, | 223 rules_stored_key_, |
| 224 new base::FundamentalValue(rules_stored)); | 224 new base::FundamentalValue(rules_stored)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace extensions | 227 } // namespace extensions |
| OLD | NEW |