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

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

Issue 8702009: Add device status reports to policy requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some now-dead code. Created 9 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) 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 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 "testid", request, &delegate); 74 "testid", request, &delegate);
75 } 75 }
76 76
77 void ProcessPolicyRequest() { 77 void ProcessPolicyRequest() {
78 em::DevicePolicyRequest request; 78 em::DevicePolicyRequest request;
79 DevicePolicyResponseDelegateMock delegate; 79 DevicePolicyResponseDelegateMock delegate;
80 EXPECT_CALL(delegate, OnError(_)).Times(AnyNumber()); 80 EXPECT_CALL(delegate, OnError(_)).Times(AnyNumber());
81 EXPECT_CALL(delegate, HandlePolicyResponse(_)).Times(AnyNumber()); 81 EXPECT_CALL(delegate, HandlePolicyResponse(_)).Times(AnyNumber());
82 backend_->ProcessPolicyRequest("token", "testid", 82 backend_->ProcessPolicyRequest("token", "testid",
83 CloudPolicyDataStore::USER_AFFILIATION_NONE, 83 CloudPolicyDataStore::USER_AFFILIATION_NONE,
84 request, &delegate); 84 request, NULL, &delegate);
85 } 85 }
86 86
87 void UnmockCreateBackend() { 87 void UnmockCreateBackend() {
88 EXPECT_CALL(service_, CreateBackend()) 88 EXPECT_CALL(service_, CreateBackend())
89 .WillOnce(Invoke(&service_, 89 .WillOnce(Invoke(&service_,
90 &MockDeviceManagementService::CreateBackendNotMocked)); 90 &MockDeviceManagementService::CreateBackendNotMocked));
91 } 91 }
92 92
93 void ExpectStartJob(net::URLRequestStatus::Status status, int response_code, 93 void ExpectStartJob(net::URLRequestStatus::Status status, int response_code,
94 const std::string& data) { 94 const std::string& data) {
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 helper.CompleteRetrieve(chromeos::SignedSettings::NOT_FOUND); 858 helper.CompleteRetrieve(chromeos::SignedSettings::NOT_FOUND);
859 helper.SetData("\xff"); 859 helper.SetData("\xff");
860 helper.SetPolicy(); 860 helper.SetPolicy();
861 ExpectSample(kMetricPolicyFetchInvalidPolicy); 861 ExpectSample(kMetricPolicyFetchInvalidPolicy);
862 EXPECT_TRUE(CheckSamples()); 862 EXPECT_TRUE(CheckSamples());
863 } 863 }
864 864
865 #endif 865 #endif
866 866
867 } // namespace policy 867 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_status_collector_unittest.cc ('k') | chrome/browser/policy/mock_device_management_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698