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

Side by Side Diff: content/browser/plugin_service_impl_browsertest.cc

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 virtual bool IsPluginAvailable( 124 virtual bool IsPluginAvailable(
125 int render_process_id, 125 int render_process_id,
126 int render_view_id, 126 int render_view_id,
127 const void* context, 127 const void* context,
128 const GURL& url, 128 const GURL& url,
129 const GURL& policy_url, 129 const GURL& policy_url,
130 webkit::WebPluginInfo* plugin) OVERRIDE { return true; } 130 webkit::WebPluginInfo* plugin) OVERRIDE { return true; }
131 131
132 virtual bool CanLoadPlugin( 132 virtual bool CanLoadPlugin(
133 int render_process_id, 133 int render_process_id,
134 const FilePath& path) OVERRIDE { return false; } 134 const base::FilePath& path) OVERRIDE { return false; }
135 }; 135 };
136 136
137 class PluginServiceTest : public ContentBrowserTest { 137 class PluginServiceTest : public ContentBrowserTest {
138 public: 138 public:
139 PluginServiceTest() {} 139 PluginServiceTest() {}
140 140
141 ResourceContext* GetResourceContext() { 141 ResourceContext* GetResourceContext() {
142 return shell()->web_contents()->GetBrowserContext()->GetResourceContext(); 142 return shell()->web_contents()->GetBrowserContext()->GetResourceContext();
143 } 143 }
144 144
145 virtual void SetUpCommandLine(CommandLine* command_line) { 145 virtual void SetUpCommandLine(CommandLine* command_line) {
146 #ifdef OS_MACOSX 146 #ifdef OS_MACOSX
147 FilePath browser_directory; 147 base::FilePath browser_directory;
148 PathService::Get(base::DIR_MODULE, &browser_directory); 148 PathService::Get(base::DIR_MODULE, &browser_directory);
149 command_line->AppendSwitchPath(switches::kExtraPluginDir, 149 command_line->AppendSwitchPath(switches::kExtraPluginDir,
150 browser_directory.AppendASCII("plugins")); 150 browser_directory.AppendASCII("plugins"));
151 #endif 151 #endif
152 // TODO(jam): since these plugin tests are running under Chrome, we need to 152 // TODO(jam): since these plugin tests are running under Chrome, we need to
153 // tell it to disable its security features for old plugins. Once this is 153 // tell it to disable its security features for old plugins. Once this is
154 // running under content_browsertests, these flags won't be needed. 154 // running under content_browsertests, these flags won't be needed.
155 // http://crbug.com/90448 155 // http://crbug.com/90448
156 // switches::kAlwaysAuthorizePlugins 156 // switches::kAlwaysAuthorizePlugins
157 command_line->AppendSwitch("always-authorize-plugins"); 157 command_line->AppendSwitch("always-authorize-plugins");
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 BrowserThread::IO, FROM_HERE, 370 BrowserThread::IO, FROM_HERE,
371 base::Bind(&OpenChannel, &mock_client)); 371 base::Bind(&OpenChannel, &mock_client));
372 RunMessageLoop(); 372 RunMessageLoop();
373 EXPECT_TRUE(mock_client.get_resource_context_called()); 373 EXPECT_TRUE(mock_client.get_resource_context_called());
374 EXPECT_TRUE(mock_client.set_plugin_info_called()); 374 EXPECT_TRUE(mock_client.set_plugin_info_called());
375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called()); 375 EXPECT_TRUE(mock_client.on_found_plugin_process_host_called());
376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called()); 376 EXPECT_TRUE(mock_client.on_sent_plugin_channel_request_called());
377 } 377 }
378 378
379 } // namespace content 379 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698