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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 client_factory_->RemoveObserver(this); 171 client_factory_->RemoveObserver(this);
172 } 172 }
173 173
174 // testing::Test: 174 // testing::Test:
175 void SetUp() override { 175 void SetUp() override {
176 clock_->SetNow(base::Time::FromDoubleT(kInitialTimeNowSeconds)); 176 clock_->SetNow(base::Time::FromDoubleT(kInitialTimeNowSeconds));
177 177
178 CryptAuthDeviceManager::RegisterPrefs(pref_service_.registry()); 178 CryptAuthDeviceManager::RegisterPrefs(pref_service_.registry());
179 pref_service_.SetUserPref( 179 pref_service_.SetUserPref(
180 prefs::kCryptAuthDeviceSyncIsRecoveringFromFailure, 180 prefs::kCryptAuthDeviceSyncIsRecoveringFromFailure,
181 new base::FundamentalValue(false)); 181 new base::Value(false));
182 pref_service_.SetUserPref(prefs::kCryptAuthDeviceSyncLastSyncTimeSeconds, 182 pref_service_.SetUserPref(prefs::kCryptAuthDeviceSyncLastSyncTimeSeconds,
183 new base::FundamentalValue(kLastSyncTimeSeconds)); 183 new base::Value(kLastSyncTimeSeconds));
184 pref_service_.SetUserPref( 184 pref_service_.SetUserPref(
185 prefs::kCryptAuthDeviceSyncReason, 185 prefs::kCryptAuthDeviceSyncReason,
186 new base::FundamentalValue(cryptauth::INVOCATION_REASON_UNKNOWN)); 186 new base::Value(cryptauth::INVOCATION_REASON_UNKNOWN));
187 187
188 std::unique_ptr<base::DictionaryValue> unlock_key_dictionary( 188 std::unique_ptr<base::DictionaryValue> unlock_key_dictionary(
189 new base::DictionaryValue()); 189 new base::DictionaryValue());
190 190
191 std::string public_key_b64, device_name_b64, bluetooth_address_b64; 191 std::string public_key_b64, device_name_b64, bluetooth_address_b64;
192 base::Base64UrlEncode(kStoredPublicKey, 192 base::Base64UrlEncode(kStoredPublicKey,
193 base::Base64UrlEncodePolicy::INCLUDE_PADDING, 193 base::Base64UrlEncodePolicy::INCLUDE_PADDING,
194 &public_key_b64); 194 &public_key_b64);
195 base::Base64UrlEncode(kStoredDeviceName, 195 base::Base64UrlEncode(kStoredDeviceName,
196 base::Base64UrlEncodePolicy::INCLUDE_PADDING, 196 base::Base64UrlEncodePolicy::INCLUDE_PADDING,
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 CryptAuthDeviceManager::DeviceChangeResult::CHANGED)); 600 CryptAuthDeviceManager::DeviceChangeResult::CHANGED));
601 success_callback_.Run(get_my_devices_response_); 601 success_callback_.Run(get_my_devices_response_);
602 602
603 ExpectUnlockKeysAndPrefAreEqual(std::vector<cryptauth::ExternalDeviceInfo>( 603 ExpectUnlockKeysAndPrefAreEqual(std::vector<cryptauth::ExternalDeviceInfo>(
604 1, get_my_devices_response_.devices(0)), 604 1, get_my_devices_response_.devices(0)),
605 device_manager_->unlock_keys(), 605 device_manager_->unlock_keys(),
606 pref_service_); 606 pref_service_);
607 } 607 }
608 608
609 } // namespace cryptauth 609 } // namespace cryptauth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698