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

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

Issue 10827069: Log the network error for failed DMServer requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/device_management_service.h" 5 #include "chrome/browser/policy/device_management_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 void DeviceManagementRequestJobImpl::Run() { 307 void DeviceManagementRequestJobImpl::Run() {
308 service_->AddJob(this); 308 service_->AddJob(this);
309 } 309 }
310 310
311 void DeviceManagementRequestJobImpl::HandleResponse( 311 void DeviceManagementRequestJobImpl::HandleResponse(
312 const net::URLRequestStatus& status, 312 const net::URLRequestStatus& status,
313 int response_code, 313 int response_code,
314 const net::ResponseCookies& cookies, 314 const net::ResponseCookies& cookies,
315 const std::string& data) { 315 const std::string& data) {
316 if (status.status() != net::URLRequestStatus::SUCCESS) { 316 if (status.status() != net::URLRequestStatus::SUCCESS) {
317 LOG(WARNING) << "DMServer request failed, status: " << status.status()
318 << ", error: " << status.error();
317 ReportError(DM_STATUS_REQUEST_FAILED); 319 ReportError(DM_STATUS_REQUEST_FAILED);
318 return; 320 return;
319 } 321 }
320 322
321 switch (response_code) { 323 switch (response_code) {
322 case kSuccess: { 324 case kSuccess: {
323 em::DeviceManagementResponse response; 325 em::DeviceManagementResponse response;
324 if (!response.ParseFromString(data)) { 326 if (!response.ParseFromString(data)) {
325 ReportError(DM_STATUS_RESPONSE_DECODING_ERROR); 327 ReportError(DM_STATUS_RESPONSE_DECODING_ERROR);
326 return; 328 return;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 } 584 }
583 } 585 }
584 586
585 const JobQueue::iterator elem = 587 const JobQueue::iterator elem =
586 std::find(queued_jobs_.begin(), queued_jobs_.end(), job); 588 std::find(queued_jobs_.begin(), queued_jobs_.end(), job);
587 if (elem != queued_jobs_.end()) 589 if (elem != queued_jobs_.end())
588 queued_jobs_.erase(elem); 590 queued_jobs_.erase(elem);
589 } 591 }
590 592
591 } // namespace policy 593 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698