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

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_crypto_delegate_chromeos.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ crypto_delegate.h" 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ crypto_delegate.h"
6 6
7 #include "chromeos/dbus/dbus_thread_manager.h" 7 #include "chromeos/dbus/dbus_thread_manager.h"
8 #include "chromeos/dbus/easy_unlock_client.h" 8 #include "chromeos/dbus/easy_unlock_client.h"
9 #include "third_party/cros_system_api/dbus/service_constants.h" 9 #include "third_party/cros_system_api/dbus/service_constants.h"
10 10
(...skipping 30 matching lines...) Expand all
41 class EasyUnlockPrivateCryptoDelegateChromeOS 41 class EasyUnlockPrivateCryptoDelegateChromeOS
42 : public extensions::api::EasyUnlockPrivateCryptoDelegate { 42 : public extensions::api::EasyUnlockPrivateCryptoDelegate {
43 public: 43 public:
44 EasyUnlockPrivateCryptoDelegateChromeOS() 44 EasyUnlockPrivateCryptoDelegateChromeOS()
45 : dbus_client_( 45 : dbus_client_(
46 chromeos::DBusThreadManager::Get()->GetEasyUnlockClient()) { 46 chromeos::DBusThreadManager::Get()->GetEasyUnlockClient()) {
47 } 47 }
48 48
49 virtual ~EasyUnlockPrivateCryptoDelegateChromeOS() {} 49 virtual ~EasyUnlockPrivateCryptoDelegateChromeOS() {}
50 50
51 virtual void GenerateEcP256KeyPair(const KeyPairCallback& callback) OVERRIDE { 51 virtual void GenerateEcP256KeyPair(const KeyPairCallback& callback) override {
52 dbus_client_->GenerateEcP256KeyPair(callback); 52 dbus_client_->GenerateEcP256KeyPair(callback);
53 } 53 }
54 54
55 virtual void PerformECDHKeyAgreement( 55 virtual void PerformECDHKeyAgreement(
56 const easy_unlock_private::PerformECDHKeyAgreement::Params& params, 56 const easy_unlock_private::PerformECDHKeyAgreement::Params& params,
57 const DataCallback& callback) OVERRIDE { 57 const DataCallback& callback) override {
58 dbus_client_->PerformECDHKeyAgreement( 58 dbus_client_->PerformECDHKeyAgreement(
59 params.private_key, 59 params.private_key,
60 params.public_key, 60 params.public_key,
61 callback); 61 callback);
62 } 62 }
63 63
64 virtual void CreateSecureMessage( 64 virtual void CreateSecureMessage(
65 const easy_unlock_private::CreateSecureMessage::Params& params, 65 const easy_unlock_private::CreateSecureMessage::Params& params,
66 const DataCallback& callback) OVERRIDE { 66 const DataCallback& callback) override {
67 chromeos::EasyUnlockClient::CreateSecureMessageOptions options; 67 chromeos::EasyUnlockClient::CreateSecureMessageOptions options;
68 options.key = params.key; 68 options.key = params.key;
69 if (params.options.associated_data) 69 if (params.options.associated_data)
70 options.associated_data = *params.options.associated_data; 70 options.associated_data = *params.options.associated_data;
71 if (params.options.public_metadata) 71 if (params.options.public_metadata)
72 options.public_metadata = *params.options.public_metadata; 72 options.public_metadata = *params.options.public_metadata;
73 if (params.options.verification_key_id) 73 if (params.options.verification_key_id)
74 options.verification_key_id = *params.options.verification_key_id; 74 options.verification_key_id = *params.options.verification_key_id;
75 if (params.options.decryption_key_id) 75 if (params.options.decryption_key_id)
76 options.decryption_key_id = *params.options.decryption_key_id; 76 options.decryption_key_id = *params.options.decryption_key_id;
77 options.encryption_type = 77 options.encryption_type =
78 EncryptionTypeToString(params.options.encrypt_type); 78 EncryptionTypeToString(params.options.encrypt_type);
79 options.signature_type = 79 options.signature_type =
80 SignatureTypeToString(params.options.sign_type); 80 SignatureTypeToString(params.options.sign_type);
81 81
82 dbus_client_->CreateSecureMessage(params.payload, options, callback); 82 dbus_client_->CreateSecureMessage(params.payload, options, callback);
83 } 83 }
84 84
85 virtual void UnwrapSecureMessage( 85 virtual void UnwrapSecureMessage(
86 const easy_unlock_private::UnwrapSecureMessage::Params& params, 86 const easy_unlock_private::UnwrapSecureMessage::Params& params,
87 const DataCallback& callback) OVERRIDE { 87 const DataCallback& callback) override {
88 chromeos::EasyUnlockClient::UnwrapSecureMessageOptions options; 88 chromeos::EasyUnlockClient::UnwrapSecureMessageOptions options;
89 options.key = params.key; 89 options.key = params.key;
90 if (params.options.associated_data) 90 if (params.options.associated_data)
91 options.associated_data = *params.options.associated_data; 91 options.associated_data = *params.options.associated_data;
92 options.encryption_type = 92 options.encryption_type =
93 EncryptionTypeToString(params.options.encrypt_type); 93 EncryptionTypeToString(params.options.encrypt_type);
94 options.signature_type = 94 options.signature_type =
95 SignatureTypeToString(params.options.sign_type); 95 SignatureTypeToString(params.options.sign_type);
96 96
97 dbus_client_->UnwrapSecureMessage(params.secure_message, options, callback); 97 dbus_client_->UnwrapSecureMessage(params.secure_message, options, callback);
98 } 98 }
99 99
100 private: 100 private:
101 chromeos::EasyUnlockClient* dbus_client_; 101 chromeos::EasyUnlockClient* dbus_client_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateCryptoDelegateChromeOS); 103 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateCryptoDelegateChromeOS);
104 }; 104 };
105 105
106 } // namespace 106 } // namespace
107 107
108 // static 108 // static
109 scoped_ptr<EasyUnlockPrivateCryptoDelegate> 109 scoped_ptr<EasyUnlockPrivateCryptoDelegate>
110 EasyUnlockPrivateCryptoDelegate::Create() { 110 EasyUnlockPrivateCryptoDelegate::Create() {
111 return scoped_ptr<EasyUnlockPrivateCryptoDelegate>( 111 return scoped_ptr<EasyUnlockPrivateCryptoDelegate>(
112 new EasyUnlockPrivateCryptoDelegateChromeOS()); 112 new EasyUnlockPrivateCryptoDelegateChromeOS());
113 } 113 }
114 114
115 } // namespace api 115 } // namespace api
116 } // namespace extensions 116 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698