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

Side by Side Diff: chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/enterprise_platform_keys_private/enterpr ise_platform_keys_private_api.h" 5 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr ise_platform_keys_private_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 async_caller, 401 async_caller,
402 attestation_flow, 402 attestation_flow,
403 install_attributes) { 403 install_attributes) {
404 } 404 }
405 405
406 EPKPChallengeUserKey::~EPKPChallengeUserKey() { 406 EPKPChallengeUserKey::~EPKPChallengeUserKey() {
407 } 407 }
408 408
409 void EPKPChallengeUserKey::RegisterProfilePrefs( 409 void EPKPChallengeUserKey::RegisterProfilePrefs(
410 user_prefs::PrefRegistrySyncable* registry) { 410 user_prefs::PrefRegistrySyncable* registry) {
411 registry->RegisterBooleanPref( 411 registry->RegisterBooleanPref(prefs::kAttestationEnabled, false);
412 prefs::kAttestationEnabled, 412 registry->RegisterListPref(prefs::kAttestationExtensionWhitelist);
413 false,
414 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
415 registry->RegisterListPref(prefs::kAttestationExtensionWhitelist,
416 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
417 } 413 }
418 414
419 bool EPKPChallengeUserKey::RunAsync() { 415 bool EPKPChallengeUserKey::RunAsync() {
420 scoped_ptr<api_epkp::ChallengeUserKey::Params> params( 416 scoped_ptr<api_epkp::ChallengeUserKey::Params> params(
421 api_epkp::ChallengeUserKey::Params::Create(*args_)); 417 api_epkp::ChallengeUserKey::Params::Create(*args_));
422 EXTENSION_FUNCTION_VALIDATE(params.get()); 418 EXTENSION_FUNCTION_VALIDATE(params.get());
423 419
424 std::string challenge; 420 std::string challenge;
425 if (!base::Base64Decode(params->challenge, &challenge)) { 421 if (!base::Base64Decode(params->challenge, &challenge)) {
426 SetError(kChallengeBadBase64Error); 422 SetError(kChallengeBadBase64Error);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 541
546 results_ = api_epkp::ChallengeUserKey::Results::Create(encoded_response); 542 results_ = api_epkp::ChallengeUserKey::Results::Create(encoded_response);
547 SendResponse(true); 543 SendResponse(true);
548 } 544 }
549 545
550 bool EPKPChallengeUserKey::IsRemoteAttestationEnabledForUser() const { 546 bool EPKPChallengeUserKey::IsRemoteAttestationEnabledForUser() const {
551 return GetProfile()->GetPrefs()->GetBoolean(prefs::kAttestationEnabled); 547 return GetProfile()->GetPrefs()->GetBoolean(prefs::kAttestationEnabled);
552 } 548 }
553 549
554 } // namespace extensions 550 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698