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
3 // found in the LICENSE file.
4
5 #include <string>
6
7 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h"
8
9 namespace extensions {
10
TestRulesRegistry(content::BrowserThread::ID owner_thread,const std::string & event_name,const WebViewKey & webview_key)11 TestRulesRegistry::TestRulesRegistry(content::BrowserThread::ID owner_thread,
12 const std::string& event_name,
13 const WebViewKey& webview_key)
14 : RulesRegistry(NULL /*profile*/,
15 event_name,
16 owner_thread,
17 NULL,
18 webview_key) {}
19
TestRulesRegistry(Profile * profile,const std::string & event_name,content::BrowserThread::ID owner_thread,RulesCacheDelegate * cache_delegate,const WebViewKey & webview_key)20 TestRulesRegistry::TestRulesRegistry(
21 Profile* profile,
22 const std::string& event_name,
23 content::BrowserThread::ID owner_thread,
24 RulesCacheDelegate* cache_delegate,
25 const WebViewKey& webview_key)
26 : RulesRegistry(profile,
27 event_name,
28 owner_thread,
29 cache_delegate,
30 webview_key) {}
31
AddRulesImpl(const std::string & extension_id,const std::vector<linked_ptr<RulesRegistry::Rule>> & rules)32 std::string TestRulesRegistry::AddRulesImpl(
33 const std::string& extension_id,
34 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) {
35 return result_;
36 }
37
RemoveRulesImpl(const std::string & extension_id,const std::vector<std::string> & rule_identifiers)38 std::string TestRulesRegistry::RemoveRulesImpl(
39 const std::string& extension_id,
40 const std::vector<std::string>& rule_identifiers) {
41 return result_;
42 }
43
RemoveAllRulesImpl(const std::string & extension_id)44 std::string TestRulesRegistry::RemoveAllRulesImpl(
45 const std::string& extension_id) {
46 return result_;
47 }
48
SetResult(const std::string & result)49 void TestRulesRegistry::SetResult(const std::string& result) {
50 result_ = result;
51 }
52
~TestRulesRegistry()53 TestRulesRegistry::~TestRulesRegistry() {}
54
55 } // namespace extensions
56