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

Side by Side Diff: extensions/browser/api/declarative/test_rules_registry.cc

Issue 764643002: Remove WebViewKey in rules registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming move "remove rules registry for webview" part to WebViewGuest. Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 6
7 #include "extensions/browser/api/declarative/test_rules_registry.h" 7 #include "extensions/browser/api/declarative/test_rules_registry.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
11 TestRulesRegistry::TestRulesRegistry(content::BrowserThread::ID owner_thread, 11 TestRulesRegistry::TestRulesRegistry(content::BrowserThread::ID owner_thread,
12 const std::string& event_name, 12 const std::string& event_name,
13 const WebViewKey& webview_key) 13 int rules_registry_id)
14 : RulesRegistry(NULL /*profile*/, 14 : RulesRegistry(NULL /*profile*/,
15 event_name, 15 event_name,
16 owner_thread, 16 owner_thread,
17 NULL, 17 NULL,
18 webview_key) {} 18 rules_registry_id) {
19 }
19 20
20 TestRulesRegistry::TestRulesRegistry( 21 TestRulesRegistry::TestRulesRegistry(content::BrowserContext* browser_context,
21 content::BrowserContext* browser_context, 22 const std::string& event_name,
22 const std::string& event_name, 23 content::BrowserThread::ID owner_thread,
23 content::BrowserThread::ID owner_thread, 24 RulesCacheDelegate* cache_delegate,
24 RulesCacheDelegate* cache_delegate, 25 int rules_registry_id)
25 const WebViewKey& webview_key)
26 : RulesRegistry(browser_context, 26 : RulesRegistry(browser_context,
27 event_name, 27 event_name,
28 owner_thread, 28 owner_thread,
29 cache_delegate, 29 cache_delegate,
30 webview_key) {} 30 rules_registry_id) {
31 }
31 32
32 std::string TestRulesRegistry::AddRulesImpl( 33 std::string TestRulesRegistry::AddRulesImpl(
33 const std::string& extension_id, 34 const std::string& extension_id,
34 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { 35 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) {
35 return result_; 36 return result_;
36 } 37 }
37 38
38 std::string TestRulesRegistry::RemoveRulesImpl( 39 std::string TestRulesRegistry::RemoveRulesImpl(
39 const std::string& extension_id, 40 const std::string& extension_id,
40 const std::vector<std::string>& rule_identifiers) { 41 const std::vector<std::string>& rule_identifiers) {
41 return result_; 42 return result_;
42 } 43 }
43 44
44 std::string TestRulesRegistry::RemoveAllRulesImpl( 45 std::string TestRulesRegistry::RemoveAllRulesImpl(
45 const std::string& extension_id) { 46 const std::string& extension_id) {
46 return result_; 47 return result_;
47 } 48 }
48 49
49 void TestRulesRegistry::SetResult(const std::string& result) { 50 void TestRulesRegistry::SetResult(const std::string& result) {
50 result_ = result; 51 result_ = result;
51 } 52 }
52 53
53 TestRulesRegistry::~TestRulesRegistry() {} 54 TestRulesRegistry::~TestRulesRegistry() {}
54 55
55 } // namespace extensions 56 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698