| 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 "chrome/browser/extensions/api/declarative/test_rules_registry.h" | 5 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" |
| 6 | 6 |
| 7 namespace extensions { | 7 namespace extensions { |
| 8 | 8 |
| 9 TestRulesRegistry::TestRulesRegistry() | 9 TestRulesRegistry::TestRulesRegistry() |
| 10 : owner_thread_(content::BrowserThread::UI) {} | 10 : RulesRegistryWithCache(NULL), |
| 11 owner_thread_(content::BrowserThread::UI) {} |
| 11 | 12 |
| 12 void TestRulesRegistry::SetOwnerThread( | 13 void TestRulesRegistry::SetOwnerThread( |
| 13 content::BrowserThread::ID owner_thread) { | 14 content::BrowserThread::ID owner_thread) { |
| 14 owner_thread_ = owner_thread; | 15 owner_thread_ = owner_thread; |
| 15 } | 16 } |
| 16 | 17 |
| 17 std::string TestRulesRegistry::AddRulesImpl( | 18 std::string TestRulesRegistry::AddRulesImpl( |
| 18 const std::string& extension_id, | 19 const std::string& extension_id, |
| 19 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { | 20 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) { |
| 20 return result_; | 21 return result_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 return owner_thread_; | 36 return owner_thread_; |
| 36 } | 37 } |
| 37 | 38 |
| 38 void TestRulesRegistry::SetResult(const std::string& result) { | 39 void TestRulesRegistry::SetResult(const std::string& result) { |
| 39 result_ = result; | 40 result_ = result; |
| 40 } | 41 } |
| 41 | 42 |
| 42 TestRulesRegistry::~TestRulesRegistry() {} | 43 TestRulesRegistry::~TestRulesRegistry() {} |
| 43 | 44 |
| 44 } // namespace extensions | 45 } // namespace extensions |
| OLD | NEW |