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

Side by Side Diff: content/child/webcrypto/webcrypto_impl.cc

Issue 272033003: [refactor] Change ordering of wrapkey parameters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/child/webcrypto/shared_crypto_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/child/webcrypto/webcrypto_impl.h" 5 #include "content/child/webcrypto/webcrypto_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 state->origin_thread->PostTask( 512 state->origin_thread->PostTask(
513 FROM_HERE, base::Bind(DoVerifyReply, Passed(&passed_state))); 513 FROM_HERE, base::Bind(DoVerifyReply, Passed(&passed_state)));
514 } 514 }
515 515
516 void DoWrapKeyReply(scoped_ptr<WrapKeyState> state) { 516 void DoWrapKeyReply(scoped_ptr<WrapKeyState> state) {
517 CompleteWithBufferOrError(state->status, state->buffer, &state->result); 517 CompleteWithBufferOrError(state->status, state->buffer, &state->result);
518 } 518 }
519 519
520 void DoWrapKey(scoped_ptr<WrapKeyState> passed_state) { 520 void DoWrapKey(scoped_ptr<WrapKeyState> passed_state) {
521 WrapKeyState* state = passed_state.get(); 521 WrapKeyState* state = passed_state.get();
522 // TODO(eroman): The parameter ordering of webcrypto::WrapKey() is
eroman 2014/05/08 23:35:45 This is what the change is all about...
523 // inconsistent with that of blink::WebCrypto::wrapKey().
524 state->status = webcrypto::WrapKey(state->format, 522 state->status = webcrypto::WrapKey(state->format,
523 state->key,
525 state->wrapping_key, 524 state->wrapping_key,
526 state->key,
527 state->wrap_algorithm, 525 state->wrap_algorithm,
528 &state->buffer); 526 &state->buffer);
529 527
530 state->origin_thread->PostTask( 528 state->origin_thread->PostTask(
531 FROM_HERE, base::Bind(DoWrapKeyReply, Passed(&passed_state))); 529 FROM_HERE, base::Bind(DoWrapKeyReply, Passed(&passed_state)));
532 } 530 }
533 531
534 void DoUnwrapKeyReply(scoped_ptr<UnwrapKeyState> state) { 532 void DoUnwrapKeyReply(scoped_ptr<UnwrapKeyState> state) {
535 CompleteWithKeyOrError(state->status, state->unwrapped_key, &state->result); 533 CompleteWithKeyOrError(state->status, state->unwrapped_key, &state->result);
536 } 534 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 &key); 736 &key);
739 } 737 }
740 738
741 bool WebCryptoImpl::serializeKeyForClone( 739 bool WebCryptoImpl::serializeKeyForClone(
742 const blink::WebCryptoKey& key, 740 const blink::WebCryptoKey& key,
743 blink::WebVector<unsigned char>& key_data) { 741 blink::WebVector<unsigned char>& key_data) {
744 return webcrypto::SerializeKeyForClone(key, &key_data); 742 return webcrypto::SerializeKeyForClone(key, &key_data);
745 } 743 }
746 744
747 } // namespace content 745 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/shared_crypto_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698