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

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

Issue 14081010: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some gtk issues Created 7 years, 8 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_main.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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 void PluginChannel::OnClearSiteData(const std::string& site, 297 void PluginChannel::OnClearSiteData(const std::string& site,
298 uint64 flags, 298 uint64 flags,
299 uint64 max_age) { 299 uint64 max_age) {
300 bool success = false; 300 bool success = false;
301 CommandLine* command_line = CommandLine::ForCurrentProcess(); 301 CommandLine* command_line = CommandLine::ForCurrentProcess();
302 base::FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath); 302 base::FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath);
303 scoped_refptr<webkit::npapi::PluginLib> plugin_lib( 303 scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
304 webkit::npapi::PluginLib::CreatePluginLib(path)); 304 webkit::npapi::PluginLib::CreatePluginLib(path));
305 if (plugin_lib.get()) { 305 if (plugin_lib) {
306 NPError err = plugin_lib->NP_Initialize(); 306 NPError err = plugin_lib->NP_Initialize();
307 if (err == NPERR_NO_ERROR) { 307 if (err == NPERR_NO_ERROR) {
308 const char* site_str = site.empty() ? NULL : site.c_str(); 308 const char* site_str = site.empty() ? NULL : site.c_str();
309 err = plugin_lib->NP_ClearSiteData(site_str, flags, max_age); 309 err = plugin_lib->NP_ClearSiteData(site_str, flags, max_age);
310 std::string site_name = 310 std::string site_name =
311 site.empty() ? "NULL" 311 site.empty() ? "NULL"
312 : base::StringPrintf("\"%s\"", site_str); 312 : base::StringPrintf("\"%s\"", site_str);
313 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", " 313 VLOG(1) << "NPP_ClearSiteData(" << site_name << ", " << flags << ", "
314 << max_age << ") returned " << err; 314 << max_age << ") returned " << err;
315 success = (err == NPERR_NO_ERROR); 315 success = (err == NPERR_NO_ERROR);
316 } 316 }
317 } 317 }
318 Send(new PluginHostMsg_ClearSiteDataResult(success)); 318 Send(new PluginHostMsg_ClearSiteDataResult(success));
319 } 319 }
320 320
321 } // namespace content 321 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698