| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/policy/user_cloud_policy_store_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "chrome/browser/chromeos/policy/user_policy_disk_cache.h" | 16 #include "chrome/browser/chromeos/policy/user_policy_disk_cache.h" |
| 17 #include "chrome/browser/chromeos/policy/user_policy_token_loader.h" | 17 #include "chrome/browser/chromeos/policy/user_policy_token_loader.h" |
| 18 #include "chrome/browser/policy/proto/cloud/device_management_local.pb.h" | 18 #include "chrome/browser/policy/proto/cloud/device_management_local.pb.h" |
| 19 #include "chromeos/dbus/cryptohome_client.h" | 19 #include "chromeos/dbus/cryptohome_client.h" |
| 20 #include "chromeos/dbus/session_manager_client.h" | 20 #include "chromeos/dbus/session_manager_client.h" |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "google_apis/gaia/gaia_auth_util.h" | 22 #include "google_apis/gaia/gaia_auth_util.h" |
| 23 #include "policy/proto/cloud_policy.pb.h" | 23 #include "policy/proto/cloud_policy.pb.h" |
| 24 | 24 |
| 25 namespace em = enterprise_management; | 25 namespace em = enterprise_management; |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 !sanitized_username.empty()) { | 488 !sanitized_username.empty()) { |
| 489 policy_key_path_ = user_policy_key_dir_.Append( | 489 policy_key_path_ = user_policy_key_dir_.Append( |
| 490 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str())); | 490 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str())); |
| 491 } else { | 491 } else { |
| 492 SampleValidationFailure(VALIDATION_FAILURE_DBUS); | 492 SampleValidationFailure(VALIDATION_FAILURE_DBUS); |
| 493 } | 493 } |
| 494 ReloadPolicyKey(callback); | 494 ReloadPolicyKey(callback); |
| 495 } | 495 } |
| 496 | 496 |
| 497 } // namespace policy | 497 } // namespace policy |
| OLD | NEW |