OLD | NEW |
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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/chromeos/logging.h" | 12 #include "base/chromeos/logging.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/threading/sequenced_worker_pool.h" | 19 #include "base/threading/sequenced_worker_pool.h" |
20 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
21 #include "base/values.h" | 21 #include "base/values.h" |
22 #include "chrome/browser/chromeos/policy/upload_job_impl.h" | 22 #include "chrome/browser/chromeos/policy/upload_job_impl.h" |
| 23 #include "components/policy/proto/device_management_backend.pb.h" |
23 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
24 #include "net/http/http_request_headers.h" | 25 #include "net/http/http_request_headers.h" |
25 #include "policy/proto/device_management_backend.pb.h" | |
26 | 26 |
27 namespace policy { | 27 namespace policy { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Determines the time, measured from the time of issue, after which the command | 31 // Determines the time, measured from the time of issue, after which the command |
32 // queue will consider this command expired if the command has not been started. | 32 // queue will consider this command expired if the command has not been started. |
33 const int kCommandExpirationTimeInMinutes = 10; | 33 const int kCommandExpirationTimeInMinutes = 10; |
34 | 34 |
35 // String constant identifying the result field in the result payload. | 35 // String constant identifying the result field in the result payload. |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 weak_ptr_factory_.GetWeakPtr(), screen), | 242 weak_ptr_factory_.GetWeakPtr(), screen), |
243 base::ThreadTaskRunnerHandle::Get())); | 243 base::ThreadTaskRunnerHandle::Get())); |
244 } | 244 } |
245 } | 245 } |
246 | 246 |
247 void DeviceCommandScreenshotJob::TerminateImpl() { | 247 void DeviceCommandScreenshotJob::TerminateImpl() { |
248 weak_ptr_factory_.InvalidateWeakPtrs(); | 248 weak_ptr_factory_.InvalidateWeakPtrs(); |
249 } | 249 } |
250 | 250 |
251 } // namespace policy | 251 } // namespace policy |
OLD | NEW |