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

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

Issue 28273006: <webview>: Implement declarativeWebRequest API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Istiaque's comments Created 7 years, 1 month 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 "chrome/browser/extensions/api/declarative/test_rules_registry.h" 7 #include "chrome/browser/extensions/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 : RulesRegistry(NULL /*profile*/, 13 : RulesRegistry(NULL /*profile*/,
14 event_name, 14 event_name,
15 owner_thread, 15 owner_thread,
16 NULL) {} 16 NULL,
17 WebViewKey(0, 0)) {}
17 18
18 TestRulesRegistry::TestRulesRegistry( 19 TestRulesRegistry::TestRulesRegistry(
19 Profile* profile, 20 Profile* profile,
20 const std::string& event_name, 21 const std::string& event_name,
21 content::BrowserThread::ID owner_thread, 22 content::BrowserThread::ID owner_thread,
22 RulesCacheDelegate* cache_delegate) 23 RulesCacheDelegate* cache_delegate)
23 : RulesRegistry(profile, 24 : RulesRegistry(profile,
24 event_name, 25 event_name,
25 owner_thread, 26 owner_thread,
26 cache_delegate) {} 27 cache_delegate,
28 WebViewKey(0, 0)) {}
27 29
28 std::string TestRulesRegistry::AddRulesImpl( 30 std::string TestRulesRegistry::AddRulesImpl(
29 const std::string& extension_id, 31 const std::string& extension_id,
30 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { 32 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) {
31 return result_; 33 return result_;
32 } 34 }
33 35
34 std::string TestRulesRegistry::RemoveRulesImpl( 36 std::string TestRulesRegistry::RemoveRulesImpl(
35 const std::string& extension_id, 37 const std::string& extension_id,
36 const std::vector<std::string>& rule_identifiers) { 38 const std::vector<std::string>& rule_identifiers) {
37 return result_; 39 return result_;
38 } 40 }
39 41
40 std::string TestRulesRegistry::RemoveAllRulesImpl( 42 std::string TestRulesRegistry::RemoveAllRulesImpl(
41 const std::string& extension_id) { 43 const std::string& extension_id) {
42 return result_; 44 return result_;
43 } 45 }
44 46
45 void TestRulesRegistry::SetResult(const std::string& result) { 47 void TestRulesRegistry::SetResult(const std::string& result) {
46 result_ = result; 48 result_ = result;
47 } 49 }
48 50
49 TestRulesRegistry::~TestRulesRegistry() {} 51 TestRulesRegistry::~TestRulesRegistry() {}
50 52
51 } // namespace extensions 53 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698