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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_operation.cc

Issue 1547093002: Switch to standard integer types in chrome/browser/chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/chromeos/login/easy_unlock/easy_unlock_create_keys_oper ation.h" 5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_create_keys_oper ation.h"
6 6
7 #include <stdint.h>
8
7 #include <string> 9 #include <string>
8 10
9 #include "base/base64url.h" 11 #include "base/base64url.h"
10 #include "base/bind.h" 12 #include "base/bind.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
13 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
14 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 17 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
15 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" 18 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
16 #include "chromeos/cryptohome/homedir_methods.h" 19 #include "chromeos/cryptohome/homedir_methods.h"
17 #include "chromeos/cryptohome/system_salt_getter.h" 20 #include "chromeos/cryptohome/system_salt_getter.h"
18 #include "chromeos/dbus/dbus_thread_manager.h" 21 #include "chromeos/dbus/dbus_thread_manager.h"
19 #include "chromeos/dbus/easy_unlock_client.h" 22 #include "chromeos/dbus/easy_unlock_client.h"
20 #include "chromeos/login/auth/key.h" 23 #include "chromeos/login/auth/key.h"
21 #include "components/proximity_auth/logging/logging.h" 24 #include "components/proximity_auth/logging/logging.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 EasyUnlockDeviceKeyData* device = &devices_[index]; 337 EasyUnlockDeviceKeyData* device = &devices_[index];
335 cryptohome::KeyDefinition key_def( 338 cryptohome::KeyDefinition key_def(
336 user_key.GetSecret(), 339 user_key.GetSecret(),
337 EasyUnlockKeyManager::GetKeyLabel(index), 340 EasyUnlockKeyManager::GetKeyLabel(index),
338 kEasyUnlockKeyPrivileges); 341 kEasyUnlockKeyPrivileges);
339 key_def.revision = kEasyUnlockKeyRevision; 342 key_def.revision = kEasyUnlockKeyRevision;
340 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 343 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
341 kEasyUnlockKeyMetaNameBluetoothAddress, device->bluetooth_address)); 344 kEasyUnlockKeyMetaNameBluetoothAddress, device->bluetooth_address));
342 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 345 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
343 kEasyUnlockKeyMetaNameBluetoothType, 346 kEasyUnlockKeyMetaNameBluetoothType,
344 static_cast<int64>(device->bluetooth_type))); 347 static_cast<int64_t>(device->bluetooth_type)));
345 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 348 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
346 kEasyUnlockKeyMetaNamePsk, device->psk)); 349 kEasyUnlockKeyMetaNamePsk, device->psk));
347 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 350 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
348 kEasyUnlockKeyMetaNamePubKey, device->public_key)); 351 kEasyUnlockKeyMetaNamePubKey, device->public_key));
349 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 352 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
350 kEasyUnlockKeyMetaNameChallenge, device->challenge)); 353 kEasyUnlockKeyMetaNameChallenge, device->challenge));
351 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData( 354 key_def.provider_data.push_back(cryptohome::KeyDefinition::ProviderData(
352 kEasyUnlockKeyMetaNameWrappedSecret, device->wrapped_secret)); 355 kEasyUnlockKeyMetaNameWrappedSecret, device->wrapped_secret));
353 356
354 // Add cryptohome key. 357 // Add cryptohome key.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 user_context_.GetKey()->GetLabel() == 394 user_context_.GetKey()->GetLabel() ==
392 EasyUnlockKeyManager::GetKeyLabel(key_creation_index_)) { 395 EasyUnlockKeyManager::GetKeyLabel(key_creation_index_)) {
393 user_context_.SetKey(user_key); 396 user_context_.SetKey(user_key);
394 } 397 }
395 398
396 ++key_creation_index_; 399 ++key_creation_index_;
397 CreateKeyForDeviceAtIndex(key_creation_index_); 400 CreateKeyForDeviceAtIndex(key_creation_index_);
398 } 401 }
399 402
400 } // namespace chromeos 403 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698