OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_SYSTEM_LOG_DELEGATE_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_SYSTEM_LOG_DELEGATE_H_ | |
7 | |
8 #include "base/task/cancelable_task_tracker.h" | |
9 #include "chrome/browser/chromeos/policy/system_log_upload_job.h" | |
10 #include "chrome/browser/chromeos/policy/upload_job.h" | |
11 | |
12 namespace policy { | |
13 | |
14 class FileReader; | |
Andrew T Wilson (Slow)
2015/07/03 15:40:47
Can this be an inner class inside SystemLogDelegat
Polina Bondarenko
2015/07/08 10:07:23
Done.
| |
15 | |
16 // An implementation of the |SystemLogUploadJob::Delegate|. | |
17 class SystemLogDelegate : public SystemLogUploadJob::Delegate { | |
18 public: | |
19 SystemLogDelegate(); | |
20 ~SystemLogDelegate() override; | |
21 | |
22 // SystemLogUploadJob::Delegate: | |
23 void LoadSystemLogs( | |
24 const SystemLogUploadJob::LogUploadCallback& upload_callback) override; | |
25 | |
26 scoped_ptr<UploadJob> CreateUploadJob(const GURL& upload_url, | |
27 UploadJob::Delegate* delegate) override; | |
28 | |
29 private: | |
30 // Used in reading log files. | |
31 base::CancelableTaskTracker tracker_; | |
32 scoped_refptr<FileReader> file_reader_; | |
33 | |
34 base::WeakPtrFactory<SystemLogDelegate> weak_ptr_factory_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(SystemLogDelegate); | |
37 }; | |
38 | |
39 } // namespace policy | |
40 | |
41 #endif // CHROME_BROWSER_CHROMEOS_POLICY_SYSTEM_LOG_DELEGATE_H_ | |
OLD | NEW |