| OLD | NEW |
| 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 const WebViewKey& webview_key) |
| 13 : RulesRegistry(NULL /*profile*/, | 14 : RulesRegistry(NULL /*profile*/, |
| 14 event_name, | 15 event_name, |
| 15 owner_thread, | 16 owner_thread, |
| 16 NULL) {} | 17 NULL, |
| 18 webview_key) {} |
| 17 | 19 |
| 18 TestRulesRegistry::TestRulesRegistry( | 20 TestRulesRegistry::TestRulesRegistry( |
| 19 Profile* profile, | 21 Profile* profile, |
| 20 const std::string& event_name, | 22 const std::string& event_name, |
| 21 content::BrowserThread::ID owner_thread, | 23 content::BrowserThread::ID owner_thread, |
| 22 RulesCacheDelegate* cache_delegate) | 24 RulesCacheDelegate* cache_delegate, |
| 25 const WebViewKey& webview_key) |
| 23 : RulesRegistry(profile, | 26 : RulesRegistry(profile, |
| 24 event_name, | 27 event_name, |
| 25 owner_thread, | 28 owner_thread, |
| 26 cache_delegate) {} | 29 cache_delegate, |
| 30 webview_key) {} |
| 27 | 31 |
| 28 std::string TestRulesRegistry::AddRulesImpl( | 32 std::string TestRulesRegistry::AddRulesImpl( |
| 29 const std::string& extension_id, | 33 const std::string& extension_id, |
| 30 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { | 34 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { |
| 31 return result_; | 35 return result_; |
| 32 } | 36 } |
| 33 | 37 |
| 34 std::string TestRulesRegistry::RemoveRulesImpl( | 38 std::string TestRulesRegistry::RemoveRulesImpl( |
| 35 const std::string& extension_id, | 39 const std::string& extension_id, |
| 36 const std::vector<std::string>& rule_identifiers) { | 40 const std::vector<std::string>& rule_identifiers) { |
| 37 return result_; | 41 return result_; |
| 38 } | 42 } |
| 39 | 43 |
| 40 std::string TestRulesRegistry::RemoveAllRulesImpl( | 44 std::string TestRulesRegistry::RemoveAllRulesImpl( |
| 41 const std::string& extension_id) { | 45 const std::string& extension_id) { |
| 42 return result_; | 46 return result_; |
| 43 } | 47 } |
| 44 | 48 |
| 45 void TestRulesRegistry::SetResult(const std::string& result) { | 49 void TestRulesRegistry::SetResult(const std::string& result) { |
| 46 result_ = result; | 50 result_ = result; |
| 47 } | 51 } |
| 48 | 52 |
| 49 TestRulesRegistry::~TestRulesRegistry() {} | 53 TestRulesRegistry::~TestRulesRegistry() {} |
| 50 | 54 |
| 51 } // namespace extensions | 55 } // namespace extensions |
| OLD | NEW |