Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: extensions/test/test_extensions_client.h

Issue 2493053002: [extensions] Stop parsing webstore urls so much (Closed)
Patch Set: rdevlin review Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_ 5 #ifndef EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
6 #define EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_ 6 #define EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "extensions/common/extensions_client.h" 9 #include "extensions/common/extensions_client.h"
10 #include "url/gurl.h"
10 11
11 namespace extensions { 12 namespace extensions {
12 13
13 class TestExtensionsClient : public ExtensionsClient { 14 class TestExtensionsClient : public ExtensionsClient {
14 public: 15 public:
15 // An interface that lets tests change the set of image paths before they are 16 // An interface that lets tests change the set of image paths before they are
16 // returned by TestExtensionClient::GetBrowserImagePaths. 17 // returned by TestExtensionClient::GetBrowserImagePaths.
17 class BrowserImagePathsFilter { 18 class BrowserImagePathsFilter {
18 public: 19 public:
19 virtual void Filter(const Extension* extension, 20 virtual void Filter(const Extension* extension,
(...skipping 22 matching lines...) Expand all
42 const ScriptingWhitelist& GetScriptingWhitelist() const override; 43 const ScriptingWhitelist& GetScriptingWhitelist() const override;
43 URLPatternSet GetPermittedChromeSchemeHosts( 44 URLPatternSet GetPermittedChromeSchemeHosts(
44 const Extension* extension, 45 const Extension* extension,
45 const APIPermissionSet& api_permissions) const override; 46 const APIPermissionSet& api_permissions) const override;
46 bool IsScriptableURL(const GURL& url, std::string* error) const override; 47 bool IsScriptableURL(const GURL& url, std::string* error) const override;
47 bool IsAPISchemaGenerated(const std::string& name) const override; 48 bool IsAPISchemaGenerated(const std::string& name) const override;
48 base::StringPiece GetAPISchema(const std::string& name) const override; 49 base::StringPiece GetAPISchema(const std::string& name) const override;
49 bool ShouldSuppressFatalErrors() const override; 50 bool ShouldSuppressFatalErrors() const override;
50 void RecordDidSuppressFatalError() override; 51 void RecordDidSuppressFatalError() override;
51 std::string GetWebstoreBaseURL() const override; 52 std::string GetWebstoreBaseURL() const override;
52 std::string GetWebstoreUpdateURL() const override; 53 const GURL& GetWebstoreUpdateURL() const override;
53 bool IsBlacklistUpdateURL(const GURL& url) const override; 54 bool IsBlacklistUpdateURL(const GURL& url) const override;
54 std::set<base::FilePath> GetBrowserImagePaths( 55 std::set<base::FilePath> GetBrowserImagePaths(
55 const Extension* extension) override; 56 const Extension* extension) override;
56 57
57 // A whitelist of extensions that can script anywhere. Do not add to this 58 // A whitelist of extensions that can script anywhere. Do not add to this
58 // list (except in tests) without consulting the Extensions team first. 59 // list (except in tests) without consulting the Extensions team first.
59 // Note: Component extensions have this right implicitly and do not need to be 60 // Note: Component extensions have this right implicitly and do not need to be
60 // added to this list. 61 // added to this list.
61 ScriptingWhitelist scripting_whitelist_; 62 ScriptingWhitelist scripting_whitelist_;
62 63
63 std::set<BrowserImagePathsFilter*> browser_image_filters_; 64 std::set<BrowserImagePathsFilter*> browser_image_filters_;
64 65
66 const GURL webstore_update_url_;
67
65 DISALLOW_COPY_AND_ASSIGN(TestExtensionsClient); 68 DISALLOW_COPY_AND_ASSIGN(TestExtensionsClient);
66 }; 69 };
67 70
68 } // namespace extensions 71 } // namespace extensions
69 72
70 #endif // EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_ 73 #endif // EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/shell/common/shell_extensions_client.cc ('k') | extensions/test/test_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698