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

Side by Side Diff: chrome/browser/policy/mock_device_management_backend.h

Issue 6727027: Update protobuf definitions for ChromeOS device policy support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 5 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 settings.SerializeToString(signed_response.mutable_policy_value())); 86 settings.SerializeToString(signed_response.mutable_policy_value()));
87 base::TimeDelta timestamp = 87 base::TimeDelta timestamp =
88 base::Time::NowFromSystemTime() - base::Time::UnixEpoch(); 88 base::Time::NowFromSystemTime() - base::Time::UnixEpoch();
89 signed_response.set_timestamp(timestamp.InMilliseconds()); 89 signed_response.set_timestamp(timestamp.InMilliseconds());
90 std::string serialized_signed_response; 90 std::string serialized_signed_response;
91 EXPECT_TRUE(signed_response.SerializeToString(&serialized_signed_response)); 91 EXPECT_TRUE(signed_response.SerializeToString(&serialized_signed_response));
92 em::DevicePolicyResponse response; 92 em::DevicePolicyResponse response;
93 em::PolicyFetchResponse* fetch_response = response.add_response(); 93 em::PolicyFetchResponse* fetch_response = response.add_response();
94 fetch_response->set_policy_data(serialized_signed_response); 94 fetch_response->set_policy_data(serialized_signed_response);
95 // TODO(jkummerow): Set proper certificate_chain and signature (when 95 // TODO(jkummerow): Set proper certificate_chain and signature (when
96 // implementing support for signature verification). 96 // implementing support for signature verification).
gfeher 2011/03/24 18:00:22 No need for one more review roundtrip after you ch
Jakob Kummerow 2011/03/25 13:11:50 Done.
97 fetch_response->set_policy_data_signature("TODO"); 97 fetch_response->set_policy_data_signature("TODO");
98 fetch_response->add_certificate_chain("TODO"); 98 fetch_response->set_new_public_key("TODO");
99 arg3->HandlePolicyResponse(response); 99 arg3->HandlePolicyResponse(response);
100 } 100 }
101 101
102 ACTION_P(MockDeviceManagementBackendFailRegister, error) { 102 ACTION_P(MockDeviceManagementBackendFailRegister, error) {
103 arg3->OnError(error); 103 arg3->OnError(error);
104 } 104 }
105 105
106 ACTION_P(MockDeviceManagementBackendFailPolicy, error) { 106 ACTION_P(MockDeviceManagementBackendFailPolicy, error) {
107 arg3->OnError(error); 107 arg3->OnError(error);
108 } 108 }
109 109
110 } // namespace policy 110 } // namespace policy
111 111
112 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 112 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_controller.cc ('k') | chrome/browser/policy/proto/chrome_device_policy.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698