| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/test/test_extensions_client.h" | 5 #include "extensions/test/test_extensions_client.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "extensions/common/api/generated_schemas.h" | 8 #include "extensions/common/api/generated_schemas.h" |
| 9 #include "extensions/common/common_manifest_handlers.h" | 9 #include "extensions/common/common_manifest_handlers.h" |
| 10 #include "extensions/common/extension_urls.h" | 10 #include "extensions/common/extension_urls.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 template <class FeatureClass> | 33 template <class FeatureClass> |
| 34 SimpleFeature* CreateFeature() { | 34 SimpleFeature* CreateFeature() { |
| 35 return new FeatureClass; | 35 return new FeatureClass; |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace | 38 } // namespace |
| 39 | 39 |
| 40 TestExtensionsClient::TestExtensionsClient() { | 40 TestExtensionsClient::TestExtensionsClient() |
| 41 } | 41 : webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) {} |
| 42 | 42 |
| 43 TestExtensionsClient::~TestExtensionsClient() { | 43 TestExtensionsClient::~TestExtensionsClient() { |
| 44 } | 44 } |
| 45 | 45 |
| 46 void TestExtensionsClient::AddBrowserImagePathsFilter( | 46 void TestExtensionsClient::AddBrowserImagePathsFilter( |
| 47 BrowserImagePathsFilter* filter) { | 47 BrowserImagePathsFilter* filter) { |
| 48 browser_image_filters_.insert(filter); | 48 browser_image_filters_.insert(filter); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void TestExtensionsClient::RemoveBrowserImagePathsFilter( | 51 void TestExtensionsClient::RemoveBrowserImagePathsFilter( |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return true; | 144 return true; |
| 145 } | 145 } |
| 146 | 146 |
| 147 void TestExtensionsClient::RecordDidSuppressFatalError() { | 147 void TestExtensionsClient::RecordDidSuppressFatalError() { |
| 148 } | 148 } |
| 149 | 149 |
| 150 std::string TestExtensionsClient::GetWebstoreBaseURL() const { | 150 std::string TestExtensionsClient::GetWebstoreBaseURL() const { |
| 151 return extension_urls::kChromeWebstoreBaseURL; | 151 return extension_urls::kChromeWebstoreBaseURL; |
| 152 } | 152 } |
| 153 | 153 |
| 154 std::string TestExtensionsClient::GetWebstoreUpdateURL() const { | 154 const GURL& TestExtensionsClient::GetWebstoreUpdateURL() const { |
| 155 return extension_urls::kChromeWebstoreUpdateURL; | 155 return webstore_update_url_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool TestExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { | 158 bool TestExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { |
| 159 return false; | 159 return false; |
| 160 } | 160 } |
| 161 | 161 |
| 162 std::set<base::FilePath> TestExtensionsClient::GetBrowserImagePaths( | 162 std::set<base::FilePath> TestExtensionsClient::GetBrowserImagePaths( |
| 163 const Extension* extension) { | 163 const Extension* extension) { |
| 164 std::set<base::FilePath> result = | 164 std::set<base::FilePath> result = |
| 165 ExtensionsClient::GetBrowserImagePaths(extension); | 165 ExtensionsClient::GetBrowserImagePaths(extension); |
| 166 for (auto* filter : browser_image_filters_) | 166 for (auto* filter : browser_image_filters_) |
| 167 filter->Filter(extension, &result); | 167 filter->Filter(extension, &result); |
| 168 return result; | 168 return result; |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace extensions | 171 } // namespace extensions |
| OLD | NEW |