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

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_cache_delegate.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/debugger/debugger_api.cc ('k') | chrome/browser/extensions/api/declarative/rules_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698