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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10917308: Remove the checksum/HMAC code from the decryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix proxy_decryptor_unittest. Created 8 years, 3 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 | « webkit/media/crypto/proxy_decryptor_unittest.cc ('k') | no next file » | 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 // TODO(xhwang): Fix initialization of PP_EncryptedBlockInfo here and 353 // TODO(xhwang): Fix initialization of PP_EncryptedBlockInfo here and
354 // anywhere else. 354 // anywhere else.
355 memset(block_info, 0, sizeof(*block_info)); 355 memset(block_info, 0, sizeof(*block_info));
356 356
357 block_info->tracking_info.request_id = request_id; 357 block_info->tracking_info.request_id = request_id;
358 block_info->tracking_info.timestamp = timestamp; 358 block_info->tracking_info.timestamp = timestamp;
359 block_info->data_offset = decrypt_config.data_offset(); 359 block_info->data_offset = decrypt_config.data_offset();
360 360
361 if (!CopyStringToArray(decrypt_config.key_id(), block_info->key_id) || 361 if (!CopyStringToArray(decrypt_config.key_id(), block_info->key_id) ||
362 !CopyStringToArray(decrypt_config.iv(), block_info->iv) || 362 !CopyStringToArray(decrypt_config.iv(), block_info->iv))
363 !CopyStringToArray(decrypt_config.checksum(), block_info->checksum))
364 return false; 363 return false;
365 364
366 block_info->key_id_size = decrypt_config.key_id().size(); 365 block_info->key_id_size = decrypt_config.key_id().size();
367 block_info->iv_size = decrypt_config.iv().size(); 366 block_info->iv_size = decrypt_config.iv().size();
368 block_info->checksum_size = decrypt_config.checksum().size();
369 367
370 if (decrypt_config.subsamples().size() > arraysize(block_info->subsamples)) 368 if (decrypt_config.subsamples().size() > arraysize(block_info->subsamples))
371 return false; 369 return false;
372 370
373 block_info->num_subsamples = decrypt_config.subsamples().size(); 371 block_info->num_subsamples = decrypt_config.subsamples().size();
374 for (uint32_t i = 0; i < block_info->num_subsamples; ++i) { 372 for (uint32_t i = 0; i < block_info->num_subsamples; ++i) {
375 block_info->subsamples[i].clear_bytes = 373 block_info->subsamples[i].clear_bytes =
376 decrypt_config.subsamples()[i].clear_bytes; 374 decrypt_config.subsamples()[i].clear_bytes;
377 block_info->subsamples[i].cipher_bytes = 375 block_info->subsamples[i].cipher_bytes =
378 decrypt_config.subsamples()[i].cypher_bytes; 376 decrypt_config.subsamples()[i].cypher_bytes;
(...skipping 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after
2668 screen_size_for_fullscreen_ = gfx::Size(); 2666 screen_size_for_fullscreen_ = gfx::Size();
2669 WebElement element = container_->element(); 2667 WebElement element = container_->element();
2670 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2668 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2671 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2669 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2672 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2670 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2673 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2671 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2674 } 2672 }
2675 2673
2676 } // namespace ppapi 2674 } // namespace ppapi
2677 } // namespace webkit 2675 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/media/crypto/proxy_decryptor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698