OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "base/syslog_logging.h" | 14 #include "base/syslog_logging.h" |
15 #include "base/task_runner_util.h" | 15 #include "base/task_runner_util.h" |
16 #include "base/threading/sequenced_worker_pool.h" | |
17 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/chromeos/policy/upload_job_impl.h" | 17 #include "chrome/browser/chromeos/policy/upload_job_impl.h" |
19 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" | 18 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" |
20 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" | 19 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" |
21 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
22 #include "components/feedback/anonymizer_tool.h" | 21 #include "components/feedback/anonymizer_tool.h" |
23 #include "components/policy/core/browser/browser_policy_connector.h" | 22 #include "components/policy/core/browser/browser_policy_connector.h" |
24 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
25 #include "net/http/http_request_headers.h" | 24 #include "net/http/http_request_headers.h" |
26 #include "system_log_uploader.h" | 25 #include "system_log_uploader.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 SYSLOG(INFO) << "Scheduling next system log upload " << delay << " from now."; | 306 SYSLOG(INFO) << "Scheduling next system log upload " << delay << " from now."; |
308 // Ensure that we never have more than one pending delayed task. | 307 // Ensure that we never have more than one pending delayed task. |
309 weak_factory_.InvalidateWeakPtrs(); | 308 weak_factory_.InvalidateWeakPtrs(); |
310 task_runner_->PostDelayedTask(FROM_HERE, | 309 task_runner_->PostDelayedTask(FROM_HERE, |
311 base::Bind(&SystemLogUploader::StartLogUpload, | 310 base::Bind(&SystemLogUploader::StartLogUpload, |
312 weak_factory_.GetWeakPtr()), | 311 weak_factory_.GetWeakPtr()), |
313 delay); | 312 delay); |
314 } | 313 } |
315 | 314 |
316 } // namespace policy | 315 } // namespace policy |
OLD | NEW |