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

Side by Side Diff: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.cc

Issue 1159163006: Fix build warning in device_command_screenshot_job.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to FAILURE_CLIENT Created 5 years, 6 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
« 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/policy/remote_commands/device_command_screensh ot_job.h" 5 #include "chrome/browser/chromeos/policy/remote_commands/device_command_screensh ot_job.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 void DeviceCommandScreenshotJob::OnSuccess() { 108 void DeviceCommandScreenshotJob::OnSuccess() {
109 base::ThreadTaskRunnerHandle::Get()->PostTask( 109 base::ThreadTaskRunnerHandle::Get()->PostTask(
110 FROM_HERE, 110 FROM_HERE,
111 base::Bind(succeeded_callback_, 111 base::Bind(succeeded_callback_,
112 base::Passed(make_scoped_ptr(new Payload(SUCCESS))))); 112 base::Passed(make_scoped_ptr(new Payload(SUCCESS)))));
113 } 113 }
114 114
115 void DeviceCommandScreenshotJob::OnFailure(UploadJob::ErrorCode error_code) { 115 void DeviceCommandScreenshotJob::OnFailure(UploadJob::ErrorCode error_code) {
116 ResultCode result_code; 116 ResultCode result_code = FAILURE_CLIENT;
117 switch (error_code) { 117 switch (error_code) {
118 case UploadJob::AUTHENTICATION_ERROR: 118 case UploadJob::AUTHENTICATION_ERROR:
119 result_code = FAILURE_AUTHENTICATION; 119 result_code = FAILURE_AUTHENTICATION;
120 break; 120 break;
121 case UploadJob::NETWORK_ERROR: 121 case UploadJob::NETWORK_ERROR:
122 case UploadJob::SERVER_ERROR: 122 case UploadJob::SERVER_ERROR:
123 result_code = FAILURE_SERVER; 123 result_code = FAILURE_SERVER;
124 break; 124 break;
125 case UploadJob::CONTENT_ENCODING_ERROR: 125 case UploadJob::CONTENT_ENCODING_ERROR:
126 result_code = FAILURE_CLIENT; 126 result_code = FAILURE_CLIENT;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 weak_ptr_factory_.GetWeakPtr(), screen), 234 weak_ptr_factory_.GetWeakPtr(), screen),
235 base::ThreadTaskRunnerHandle::Get())); 235 base::ThreadTaskRunnerHandle::Get()));
236 } 236 }
237 } 237 }
238 238
239 void DeviceCommandScreenshotJob::TerminateImpl() { 239 void DeviceCommandScreenshotJob::TerminateImpl() {
240 weak_ptr_factory_.InvalidateWeakPtrs(); 240 weak_ptr_factory_.InvalidateWeakPtrs();
241 } 241 }
242 242
243 } // namespace policy 243 } // 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