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

Side by Side Diff: components/cryptauth/cryptauth_device_manager_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/cryptauth/cryptauth_device_manager.h" 5 #include "components/cryptauth/cryptauth_device_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 client_factory_->RemoveObserver(this); 376 client_factory_->RemoveObserver(this);
377 } 377 }
378 378
379 // testing::Test: 379 // testing::Test:
380 void SetUp() override { 380 void SetUp() override {
381 clock_->SetNow(base::Time::FromDoubleT(kInitialTimeNowSeconds)); 381 clock_->SetNow(base::Time::FromDoubleT(kInitialTimeNowSeconds));
382 382
383 CryptAuthDeviceManager::RegisterPrefs(pref_service_.registry()); 383 CryptAuthDeviceManager::RegisterPrefs(pref_service_.registry());
384 pref_service_.SetUserPref( 384 pref_service_.SetUserPref(
385 prefs::kCryptAuthDeviceSyncIsRecoveringFromFailure, 385 prefs::kCryptAuthDeviceSyncIsRecoveringFromFailure,
386 new base::FundamentalValue(false)); 386 new base::Value(false));
387 pref_service_.SetUserPref(prefs::kCryptAuthDeviceSyncLastSyncTimeSeconds, 387 pref_service_.SetUserPref(prefs::kCryptAuthDeviceSyncLastSyncTimeSeconds,
388 new base::FundamentalValue(kLastSyncTimeSeconds)); 388 new base::Value(kLastSyncTimeSeconds));
389 pref_service_.SetUserPref( 389 pref_service_.SetUserPref(prefs::kCryptAuthDeviceSyncReason,
390 prefs::kCryptAuthDeviceSyncReason, 390 new base::Value(INVOCATION_REASON_UNKNOWN));
391 new base::FundamentalValue(INVOCATION_REASON_UNKNOWN));
392 391
393 std::unique_ptr<base::DictionaryValue> device_dictionary( 392 std::unique_ptr<base::DictionaryValue> device_dictionary(
394 new base::DictionaryValue()); 393 new base::DictionaryValue());
395 394
396 std::string public_key_b64, device_name_b64, bluetooth_address_b64; 395 std::string public_key_b64, device_name_b64, bluetooth_address_b64;
397 base::Base64UrlEncode(kStoredPublicKey, 396 base::Base64UrlEncode(kStoredPublicKey,
398 base::Base64UrlEncodePolicy::INCLUDE_PADDING, 397 base::Base64UrlEncodePolicy::INCLUDE_PADDING,
399 &public_key_b64); 398 &public_key_b64);
400 base::Base64UrlEncode(kStoredDeviceName, 399 base::Base64UrlEncode(kStoredDeviceName,
401 base::Base64UrlEncodePolicy::INCLUDE_PADDING, 400 base::Base64UrlEncodePolicy::INCLUDE_PADDING,
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 std::vector<ExternalDeviceInfo>(1, devices_in_response_[0]), 898 std::vector<ExternalDeviceInfo>(1, devices_in_response_[0]),
900 device_manager_->GetUnlockKeys()); 899 device_manager_->GetUnlockKeys());
901 900
902 // Only tether hosts. 901 // Only tether hosts.
903 ExpectSyncedDevicesAreEqual( 902 ExpectSyncedDevicesAreEqual(
904 std::vector<ExternalDeviceInfo>(1, devices_in_response_[0]), 903 std::vector<ExternalDeviceInfo>(1, devices_in_response_[0]),
905 device_manager_->GetTetherHosts()); 904 device_manager_->GetTetherHosts());
906 } 905 }
907 906
908 } // namespace cryptauth 907 } // namespace cryptauth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698