Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / declarative / test_rules_registry.cc
bloba8d359524ffd061b53c723434b9e82aab2fb307f
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.
5 #include <string>
7 #include "extensions/browser/api/declarative/test_rules_registry.h"
9 namespace extensions {
11 TestRulesRegistry::TestRulesRegistry(content::BrowserThread::ID owner_thread,
12 const std::string& event_name,
13 int rules_registry_id)
14 : RulesRegistry(NULL /*profile*/,
15 event_name,
16 owner_thread,
17 NULL,
18 rules_registry_id) {
21 TestRulesRegistry::TestRulesRegistry(content::BrowserContext* browser_context,
22 const std::string& event_name,
23 content::BrowserThread::ID owner_thread,
24 RulesCacheDelegate* cache_delegate,
25 int rules_registry_id)
26 : RulesRegistry(browser_context,
27 event_name,
28 owner_thread,
29 cache_delegate,
30 rules_registry_id) {
33 std::string TestRulesRegistry::AddRulesImpl(
34 const std::string& extension_id,
35 const std::vector<linked_ptr<api::events::Rule>>& rules) {
36 return result_;
39 std::string TestRulesRegistry::RemoveRulesImpl(
40 const std::string& extension_id,
41 const std::vector<std::string>& rule_identifiers) {
42 return result_;
45 std::string TestRulesRegistry::RemoveAllRulesImpl(
46 const std::string& extension_id) {
47 return result_;
50 void TestRulesRegistry::SetResult(const std::string& result) {
51 result_ = result;
54 TestRulesRegistry::~TestRulesRegistry() {}
56 } // namespace extensions