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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_store.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/policy/cloud/user_cloud_policy_store.h" 5 #include "chrome/browser/policy/cloud/user_cloud_policy_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
11 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
12 #include "chrome/browser/policy/proto/cloud/device_management_local.pb.h"
13 #include "policy/policy_constants.h" 11 #include "policy/policy_constants.h"
14 #include "policy/proto/cloud_policy.pb.h" 12 #include "policy/proto/cloud_policy.pb.h"
13 #include "policy/proto/device_management_backend.pb.h"
15 14
16 namespace em = enterprise_management; 15 namespace em = enterprise_management;
17 16
18 namespace policy { 17 namespace policy {
19 18
20 enum PolicyLoadStatus { 19 enum PolicyLoadStatus {
21 // Policy blob was successfully loaded and parsed. 20 // Policy blob was successfully loaded and parsed.
22 LOAD_RESULT_SUCCESS, 21 LOAD_RESULT_SUCCESS,
23 22
24 // No previously stored policy was found. 23 // No previously stored policy was found.
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 background_task_runner()->PostTask( 246 background_task_runner()->PostTask(
248 FROM_HERE, 247 FROM_HERE,
249 base::Bind(&StorePolicyToDiskOnBackgroundThread, 248 base::Bind(&StorePolicyToDiskOnBackgroundThread,
250 backing_file_path_, *validator->policy())); 249 backing_file_path_, *validator->policy()));
251 InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); 250 InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass());
252 status_ = STATUS_OK; 251 status_ = STATUS_OK;
253 NotifyStoreLoaded(); 252 NotifyStoreLoaded();
254 } 253 }
255 254
256 } // namespace policy 255 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698