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

Side by Side Diff: content/test/fake_plugin_service.h

Issue 953793003: Ensuring interception of stream get determined by plugin path before checking mime type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding Test Case. Created 5 years, 9 months 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 CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ 5 #ifndef CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_
6 #define CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ 6 #define CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/plugin_service.h" 9 #include "content/public/browser/plugin_service.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class FakePluginService : public PluginService { 13 class FakePluginService : public PluginService {
14 public: 14 public:
15 FakePluginService(); 15 FakePluginService();
16 FakePluginService(bool is_plugin_available);
16 ~FakePluginService() override; 17 ~FakePluginService() override;
17 // PluginService implementation: 18 // PluginService implementation:
18 void Init() override; 19 void Init() override;
19 void StartWatchingPlugins() override; 20 void StartWatchingPlugins() override;
20 bool GetPluginInfoArray(const GURL& url, 21 bool GetPluginInfoArray(const GURL& url,
21 const std::string& mime_type, 22 const std::string& mime_type,
22 bool allow_wildcard, 23 bool allow_wildcard,
23 std::vector<WebPluginInfo>* info, 24 std::vector<WebPluginInfo>* info,
24 std::vector<std::string>* actual_mime_types) override; 25 std::vector<std::string>* actual_mime_types) override;
25 bool GetPluginInfo(int render_process_id, 26 bool GetPluginInfo(int render_process_id,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void AppActivated() override; 59 void AppActivated() override;
59 #elif defined(OS_WIN) 60 #elif defined(OS_WIN)
60 bool GetPluginInfoFromWindow(HWND window, 61 bool GetPluginInfoFromWindow(HWND window,
61 base::string16* plugin_name, 62 base::string16* plugin_name,
62 base::string16* plugin_version) override; 63 base::string16* plugin_version) override;
63 #endif 64 #endif
64 bool PpapiDevChannelSupported(BrowserContext* browser_context, 65 bool PpapiDevChannelSupported(BrowserContext* browser_context,
65 const GURL& document_url) override; 66 const GURL& document_url) override;
66 67
67 private: 68 private:
69 bool is_plugin_available_;
68 DISALLOW_COPY_AND_ASSIGN(FakePluginService); 70 DISALLOW_COPY_AND_ASSIGN(FakePluginService);
69 }; 71 };
70 72
71 } // namespace content 73 } // namespace content
72 74
73 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_ 75 #endif // CONTENT_TEST_FAKE_PLUGIN_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698