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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
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/mock_cloud_policy_client.h" 5 #include "chrome/browser/policy/cloud/mock_cloud_policy_client.h"
6 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" 6 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h"
7 7
8 namespace em = enterprise_management; 8 namespace em = enterprise_management;
9 9
10 namespace policy { 10 namespace policy {
11 11
12 MockCloudPolicyClient::MockCloudPolicyClient() 12 MockCloudPolicyClient::MockCloudPolicyClient()
13 : CloudPolicyClient("", "", USER_AFFILIATION_NONE, NULL, NULL) {} 13 : CloudPolicyClient(std::string(),
14 std::string(),
15 USER_AFFILIATION_NONE,
16 NULL,
17 NULL) {}
14 18
15 MockCloudPolicyClient::~MockCloudPolicyClient() {} 19 MockCloudPolicyClient::~MockCloudPolicyClient() {}
16 20
17 void MockCloudPolicyClient::SetDMToken(const std::string& token) { 21 void MockCloudPolicyClient::SetDMToken(const std::string& token) {
18 dm_token_ = token; 22 dm_token_ = token;
19 } 23 }
20 24
21 void MockCloudPolicyClient::SetPolicy(const PolicyNamespaceKey& policy_ns_key, 25 void MockCloudPolicyClient::SetPolicy(const PolicyNamespaceKey& policy_ns_key,
22 const em::PolicyFetchResponse& policy) { 26 const em::PolicyFetchResponse& policy) {
23 em::PolicyFetchResponse*& response = responses_[policy_ns_key]; 27 em::PolicyFetchResponse*& response = responses_[policy_ns_key];
24 delete response; 28 delete response;
25 response = new enterprise_management::PolicyFetchResponse(policy); 29 response = new enterprise_management::PolicyFetchResponse(policy);
26 } 30 }
27 31
28 void MockCloudPolicyClient::SetStatus(DeviceManagementStatus status) { 32 void MockCloudPolicyClient::SetStatus(DeviceManagementStatus status) {
29 status_ = status; 33 status_ = status;
30 } 34 }
31 35
32 MockCloudPolicyClientObserver::MockCloudPolicyClientObserver() {} 36 MockCloudPolicyClientObserver::MockCloudPolicyClientObserver() {}
33 37
34 MockCloudPolicyClientObserver::~MockCloudPolicyClientObserver() {} 38 MockCloudPolicyClientObserver::~MockCloudPolicyClientObserver() {}
35 39
36 } // namespace policy 40 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698