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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc

Issue 108563005: Move the cloud policy protobufs into the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years 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 | Annotate | Revision Log
OLDNEW
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/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/sequenced_task_runner.h" 14 #include "base/sequenced_task_runner.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "chrome/browser/chromeos/policy/user_policy_disk_cache.h" 17 #include "chrome/browser/chromeos/policy/user_policy_disk_cache.h"
18 #include "chrome/browser/chromeos/policy/user_policy_token_loader.h" 18 #include "chrome/browser/chromeos/policy/user_policy_token_loader.h"
19 #include "chrome/browser/policy/proto/cloud/device_management_local.pb.h"
20 #include "chromeos/dbus/cryptohome_client.h" 19 #include "chromeos/dbus/cryptohome_client.h"
21 #include "chromeos/dbus/session_manager_client.h" 20 #include "chromeos/dbus/session_manager_client.h"
22 #include "google_apis/gaia/gaia_auth_util.h" 21 #include "google_apis/gaia/gaia_auth_util.h"
23 #include "policy/proto/cloud_policy.pb.h" 22 #include "policy/proto/cloud_policy.pb.h"
23 #include "policy/proto/device_management_local.pb.h"
24 24
25 namespace em = enterprise_management; 25 namespace em = enterprise_management;
26 26
27 namespace policy { 27 namespace policy {
28 28
29 namespace { 29 namespace {
30 30
31 // Path within |user_policy_key_dir_| that contains the policy key. 31 // Path within |user_policy_key_dir_| that contains the policy key.
32 // "%s" must be substituted with the sanitized username. 32 // "%s" must be substituted with the sanitized username.
33 const base::FilePath::CharType kPolicyKeyFile[] = 33 const base::FilePath::CharType kPolicyKeyFile[] =
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 !sanitized_username.empty()) { 548 !sanitized_username.empty()) {
549 policy_key_path_ = user_policy_key_dir_.Append( 549 policy_key_path_ = user_policy_key_dir_.Append(
550 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str())); 550 base::StringPrintf(kPolicyKeyFile, sanitized_username.c_str()));
551 } else { 551 } else {
552 SampleValidationFailure(VALIDATION_FAILURE_DBUS); 552 SampleValidationFailure(VALIDATION_FAILURE_DBUS);
553 } 553 }
554 ReloadPolicyKey(callback); 554 ReloadPolicyKey(callback);
555 } 555 }
556 556
557 } // namespace policy 557 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698