OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/signed_settings.h" | 5 #include "chrome/browser/chromeos/login/signed_settings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/chromeos/cros/cros_library.h" | 15 #include "chrome/browser/chromeos/cros/cros_library.h" |
16 #include "chrome/browser/chromeos/cros_settings_names.h" | 16 #include "chrome/browser/chromeos/cros_settings_names.h" |
17 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 17 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
18 #include "chrome/browser/chromeos/dbus/session_manager_client.h" | 18 #include "chrome/browser/chromeos/dbus/session_manager_client.h" |
19 #include "chrome/browser/chromeos/login/authenticator.h" | 19 #include "chrome/browser/chromeos/login/authenticator.h" |
20 #include "chrome/browser/chromeos/login/ownership_service.h" | 20 #include "chrome/browser/chromeos/login/ownership_service.h" |
21 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" | 21 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" |
22 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" | 22 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" |
23 #include "chrome/browser/policy/proto/device_management_backend.pb.h" | 23 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 | 25 |
26 namespace chromeos { | 26 namespace chromeos { |
| 27 using content::BrowserThread; |
27 using google::protobuf::RepeatedPtrField; | 28 using google::protobuf::RepeatedPtrField; |
28 using std::string; | 29 using std::string; |
29 | 30 |
30 // static | 31 // static |
31 const char SignedSettings::kDevicePolicyType[] = "google/chromeos/device"; | 32 const char SignedSettings::kDevicePolicyType[] = "google/chromeos/device"; |
32 | 33 |
33 SignedSettings::Relay::Relay(SignedSettings* s) : settings_(s) { | 34 SignedSettings::Relay::Relay(SignedSettings* s) : settings_(s) { |
34 } | 35 } |
35 | 36 |
36 SignedSettings::Relay::~Relay() {} | 37 SignedSettings::Relay::~Relay() {} |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); | 931 sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); |
931 service_->StartVerifyAttempt(policy_.policy_data(), sig, this); | 932 service_->StartVerifyAttempt(policy_.policy_data(), sig, this); |
932 } | 933 } |
933 | 934 |
934 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, | 935 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, |
935 const em::PolicyFetchResponse& value) { | 936 const em::PolicyFetchResponse& value) { |
936 d_->OnSettingsOpCompleted(code, value); | 937 d_->OnSettingsOpCompleted(code, value); |
937 } | 938 } |
938 | 939 |
939 } // namespace chromeos | 940 } // namespace chromeos |
OLD | NEW |