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

Side by Side Diff: content/ppapi_plugin/broker_process_dispatcher.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 6 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
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/ppapi_plugin/broker_process_dispatcher.h" 5 #include "content/ppapi_plugin/broker_process_dispatcher.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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void GetPermissionSettingsCallback( 43 void GetPermissionSettingsCallback(
44 void* user_data, 44 void* user_data,
45 PP_Bool success, 45 PP_Bool success,
46 PP_Flash_BrowserOperations_Permission default_permission, 46 PP_Flash_BrowserOperations_Permission default_permission,
47 uint32_t site_count, 47 uint32_t site_count,
48 const PP_Flash_BrowserOperations_SiteSetting sites[]) { 48 const PP_Flash_BrowserOperations_SiteSetting sites[]) {
49 scoped_ptr<GetPermissionSettingsContext> context( 49 scoped_ptr<GetPermissionSettingsContext> context(
50 reinterpret_cast<GetPermissionSettingsContext*>(user_data)); 50 reinterpret_cast<GetPermissionSettingsContext*>(user_data));
51 51
52 if (!context->dispatcher) 52 if (!context->dispatcher.get())
53 return; 53 return;
54 54
55 ppapi::FlashSiteSettings site_vector; 55 ppapi::FlashSiteSettings site_vector;
56 if (success) { 56 if (success) {
57 site_vector.reserve(site_count); 57 site_vector.reserve(site_count);
58 for (uint32_t i = 0; i < site_count; ++i) { 58 for (uint32_t i = 0; i < site_count; ++i) {
59 if (!sites[i].site) { 59 if (!sites[i].site) {
60 success = PP_FALSE; 60 success = PP_FALSE;
61 break; 61 break;
62 } 62 }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission( 323 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission(
324 data_str.c_str(), setting_type, sites.size(), site_array.get()); 324 data_str.c_str(), setting_type, sites.size(), site_array.get());
325 325
326 return PP_ToBool(result); 326 return PP_ToBool(result);
327 } 327 }
328 328
329 return false; 329 return false;
330 } 330 }
331 331
332 } // namespace content 332 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/webplugin_delegate_stub.cc ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698