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

Side by Side Diff: chrome/browser/chromeos/policy/system_log_delegate.h

Issue 1193333017: Added system log uploader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added FileReader - helper class that reads files thread safely. Created 5 years, 5 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698