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

Side by Side Diff: content/plugin/plugin_channel.cc

Issue 12208057: Add explicit base to FilePath. (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/gpu/gpu_info_collector_win.cc ('k') | content/plugin/plugin_thread.cc » ('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/plugin/plugin_channel.h" 5 #include "content/plugin/plugin_channel.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 void PluginChannel::OnGenerateRouteID(int* route_id) { 291 void PluginChannel::OnGenerateRouteID(int* route_id) {
292 *route_id = GenerateRouteID(); 292 *route_id = GenerateRouteID();
293 } 293 }
294 294
295 void PluginChannel::OnClearSiteData(const std::string& site, 295 void PluginChannel::OnClearSiteData(const std::string& site,
296 uint64 flags, 296 uint64 flags,
297 uint64 max_age) { 297 uint64 max_age) {
298 bool success = false; 298 bool success = false;
299 CommandLine* command_line = CommandLine::ForCurrentProcess(); 299 CommandLine* command_line = CommandLine::ForCurrentProcess();
300 FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath); 300 base::FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath);
301 scoped_refptr<webkit::npapi::PluginLib> plugin_lib( 301 scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
302 webkit::npapi::PluginLib::CreatePluginLib(path)); 302 webkit::npapi::PluginLib::CreatePluginLib(path));
303 if (plugin_lib.get()) { 303 if (plugin_lib.get()) {
304 NPError err = plugin_lib->NP_Initialize(); 304 NPError err = plugin_lib->NP_Initialize();
305 if (err == NPERR_NO_ERROR) { 305 if (err == NPERR_NO_ERROR) {
306 const char* site_str = site.empty() ? NULL : site.c_str(); 306 const char* site_str = site.empty() ? NULL : site.c_str();
307 err = plugin_lib->NP_ClearSiteData(site_str, flags, max_age); 307 err = plugin_lib->NP_ClearSiteData(site_str, flags, max_age);
308 std::string site_name = 308 std::string site_name =
309 site.empty() ? "NULL" 309 site.empty() ? "NULL"
310 : base::StringPrintf("\"%s\"", site_str); 310 : base::StringPrintf("\"%s\"", site_str);
311 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", " 311 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", "
312 << max_age << ") returned " << err; 312 << max_age << ") returned " << err;
313 success = (err == NPERR_NO_ERROR); 313 success = (err == NPERR_NO_ERROR);
314 } 314 }
315 } 315 }
316 Send(new PluginHostMsg_ClearSiteDataResult(success)); 316 Send(new PluginHostMsg_ClearSiteDataResult(success));
317 } 317 }
318 318
319 } // namespace content 319 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_info_collector_win.cc ('k') | content/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698