| OLD | NEW |
| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 scoped_ptr<PP_Flash_BrowserOperations_SiteSetting[]> site_array( | 302 scoped_ptr<PP_Flash_BrowserOperations_SiteSetting[]> site_array( |
| 303 new PP_Flash_BrowserOperations_SiteSetting[sites.size()]); | 303 new PP_Flash_BrowserOperations_SiteSetting[sites.size()]); |
| 304 | 304 |
| 305 for (size_t i = 0; i < sites.size(); ++i) { | 305 for (size_t i = 0; i < sites.size(); ++i) { |
| 306 site_array[i].site = sites[i].site.c_str(); | 306 site_array[i].site = sites[i].site.c_str(); |
| 307 site_array[i].permission = sites[i].permission; | 307 site_array[i].permission = sites[i].permission; |
| 308 } | 308 } |
| 309 | 309 |
| 310 if (flash_browser_operations_1_3_) { | 310 if (flash_browser_operations_1_3_) { |
| 311 PP_Bool result = flash_browser_operations_1_3_->SetSitePermission( | 311 PP_Bool result = flash_browser_operations_1_3_->SetSitePermission( |
| 312 data_str.c_str(), setting_type, sites.size(), site_array.get()); | 312 data_str.c_str(), setting_type, |
| 313 static_cast<uint32_t>(sites.size()), site_array.get()); |
| 313 | 314 |
| 314 return PP_ToBool(result); | 315 return PP_ToBool(result); |
| 315 } | 316 } |
| 316 | 317 |
| 317 if (flash_browser_operations_1_2_) { | 318 if (flash_browser_operations_1_2_) { |
| 318 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission( | 319 PP_Bool result = flash_browser_operations_1_2_->SetSitePermission( |
| 319 data_str.c_str(), setting_type, sites.size(), site_array.get()); | 320 data_str.c_str(), setting_type, |
| 321 static_cast<uint32_t>(sites.size()), site_array.get()); |
| 320 | 322 |
| 321 return PP_ToBool(result); | 323 return PP_ToBool(result); |
| 322 } | 324 } |
| 323 | 325 |
| 324 return false; | 326 return false; |
| 325 } | 327 } |
| 326 | 328 |
| 327 } // namespace content | 329 } // namespace content |
| OLD | NEW |