| 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 "extensions/browser/api/declarative/rules_cache_delegate.h" | 5 #include "extensions/browser/api/declarative/rules_cache_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
| 10 #include "content/public/browser/notification_details.h" | 10 #include "content/public/browser/notification_details.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 } | 216 } |
| 217 | 217 |
| 218 void RulesCacheDelegate::SetDeclarativeRulesStored( | 218 void RulesCacheDelegate::SetDeclarativeRulesStored( |
| 219 const std::string& extension_id, | 219 const std::string& extension_id, |
| 220 bool rules_stored) { | 220 bool rules_stored) { |
| 221 CHECK(browser_context_); | 221 CHECK(browser_context_); |
| 222 DCHECK(ExtensionRegistry::Get(browser_context_) | 222 DCHECK(ExtensionRegistry::Get(browser_context_) |
| 223 ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING)); | 223 ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING)); |
| 224 | 224 |
| 225 ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(browser_context_); | 225 ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(browser_context_); |
| 226 extension_prefs->UpdateExtensionPref( | 226 extension_prefs->UpdateExtensionPref(extension_id, rules_stored_key_, |
| 227 extension_id, | 227 new base::Value(rules_stored)); |
| 228 rules_stored_key_, | |
| 229 new base::FundamentalValue(rules_stored)); | |
| 230 } | 228 } |
| 231 | 229 |
| 232 } // namespace extensions | 230 } // namespace extensions |
| OLD | NEW |