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

Side by Side Diff: chrome/browser/policy/mock_cloud_policy_client.cc

Issue 12189011: Split up chrome/browser/policy subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add chrome/browser/chromeos/policy/OWNERS Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/mock_cloud_policy_client.h"
6 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
7
8 namespace em = enterprise_management;
9
10 namespace policy {
11
12 MockCloudPolicyClient::MockCloudPolicyClient()
13 : CloudPolicyClient("", "", USER_AFFILIATION_NONE, NULL, NULL) {}
14
15 MockCloudPolicyClient::~MockCloudPolicyClient() {}
16
17 void MockCloudPolicyClient::SetDMToken(const std::string& token) {
18 dm_token_ = token;
19 }
20
21 void MockCloudPolicyClient::SetPolicy(const PolicyNamespaceKey& policy_ns_key,
22 const em::PolicyFetchResponse& policy) {
23 em::PolicyFetchResponse*& response = responses_[policy_ns_key];
24 delete response;
25 response = new enterprise_management::PolicyFetchResponse(policy);
26 }
27
28 void MockCloudPolicyClient::SetStatus(DeviceManagementStatus status) {
29 status_ = status;
30 }
31
32 MockCloudPolicyClientObserver::MockCloudPolicyClientObserver() {}
33
34 MockCloudPolicyClientObserver::~MockCloudPolicyClientObserver() {}
35
36 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/mock_cloud_policy_client.h ('k') | chrome/browser/policy/mock_cloud_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698