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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/prefs/pref_service.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
15 #include "base/values.h" 14 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chromeos/attestation/attestation_ca_client.h" 16 #include "chrome/browser/chromeos/attestation/attestation_ca_client.h"
18 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 17 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
19 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" 18 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
20 #include "chrome/browser/chromeos/settings/cros_settings.h" 19 #include "chrome/browser/chromeos/settings/cros_settings.h"
21 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/signin/signin_manager_factory.h" 21 #include "chrome/browser/signin/signin_manager_factory.h"
23 #include "chrome/common/extensions/api/enterprise_platform_keys_private.h" 22 #include "chrome/common/extensions/api/enterprise_platform_keys_private.h"
24 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
25 #include "chromeos/attestation/attestation_constants.h" 24 #include "chromeos/attestation/attestation_constants.h"
26 #include "chromeos/attestation/attestation_flow.h" 25 #include "chromeos/attestation/attestation_flow.h"
27 #include "chromeos/cryptohome/async_method_caller.h" 26 #include "chromeos/cryptohome/async_method_caller.h"
28 #include "chromeos/dbus/cryptohome_client.h" 27 #include "chromeos/dbus/cryptohome_client.h"
29 #include "chromeos/dbus/dbus_method_call_status.h" 28 #include "chromeos/dbus/dbus_method_call_status.h"
30 #include "chromeos/dbus/dbus_thread_manager.h" 29 #include "chromeos/dbus/dbus_thread_manager.h"
31 #include "chromeos/settings/cros_settings_names.h" 30 #include "chromeos/settings/cros_settings_names.h"
32 #include "components/pref_registry/pref_registry_syncable.h" 31 #include "components/pref_registry/pref_registry_syncable.h"
32 #include "components/prefs/pref_service.h"
33 #include "components/signin/core/account_id/account_id.h" 33 #include "components/signin/core/account_id/account_id.h"
34 #include "components/signin/core/browser/signin_manager.h" 34 #include "components/signin/core/browser/signin_manager.h"
35 #include "components/user_manager/user.h" 35 #include "components/user_manager/user.h"
36 #include "components/user_manager/user_manager.h" 36 #include "components/user_manager/user_manager.h"
37 #include "google_apis/gaia/gaia_auth_util.h" 37 #include "google_apis/gaia/gaia_auth_util.h"
38 #include "third_party/cros_system_api/dbus/service_constants.h" 38 #include "third_party/cros_system_api/dbus/service_constants.h"
39 39
40 namespace extensions { 40 namespace extensions {
41 41
42 namespace api_epkp = api::enterprise_platform_keys_private; 42 namespace api_epkp = api::enterprise_platform_keys_private;
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 results_ = api_epkp::ChallengeUserKey::Results::Create(encoded_response); 555 results_ = api_epkp::ChallengeUserKey::Results::Create(encoded_response);
556 SendResponse(true); 556 SendResponse(true);
557 } 557 }
558 558
559 bool EPKPChallengeUserKey::IsRemoteAttestationEnabledForUser() const { 559 bool EPKPChallengeUserKey::IsRemoteAttestationEnabledForUser() const {
560 return GetProfile()->GetPrefs()->GetBoolean(prefs::kAttestationEnabled); 560 return GetProfile()->GetPrefs()->GetBoolean(prefs::kAttestationEnabled);
561 } 561 }
562 562
563 } // namespace extensions 563 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698