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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/download_operation.h

Issue 408143014: Rename OperationObserver to OperationDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/drive/file_errors.h" 10 #include "chrome/browser/chromeos/drive/file_errors.h"
(...skipping 16 matching lines...) Expand all
27 class ResourceEntry; 27 class ResourceEntry;
28 struct ClientContext; 28 struct ClientContext;
29 29
30 namespace internal { 30 namespace internal {
31 class FileCache; 31 class FileCache;
32 class ResourceMetadata; 32 class ResourceMetadata;
33 } // namespace internal 33 } // namespace internal
34 34
35 namespace file_system { 35 namespace file_system {
36 36
37 class OperationObserver; 37 class OperationDelegate;
38 38
39 class DownloadOperation { 39 class DownloadOperation {
40 public: 40 public:
41 DownloadOperation(base::SequencedTaskRunner* blocking_task_runner, 41 DownloadOperation(base::SequencedTaskRunner* blocking_task_runner,
42 OperationObserver* observer, 42 OperationDelegate* delegate,
43 JobScheduler* scheduler, 43 JobScheduler* scheduler,
44 internal::ResourceMetadata* metadata, 44 internal::ResourceMetadata* metadata,
45 internal::FileCache* cache, 45 internal::FileCache* cache,
46 const base::FilePath& temporary_file_directory); 46 const base::FilePath& temporary_file_directory);
47 ~DownloadOperation(); 47 ~DownloadOperation();
48 48
49 // Ensures that the file content specified by |local_id| is locally 49 // Ensures that the file content specified by |local_id| is locally
50 // downloaded and returns a closure to cancel the task. 50 // downloaded and returns a closure to cancel the task.
51 // For hosted documents, this method may create a JSON file representing the 51 // For hosted documents, this method may create a JSON file representing the
52 // file. 52 // file.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 const base::FilePath& file_path, 105 const base::FilePath& file_path,
106 scoped_ptr<DownloadParams> params, 106 scoped_ptr<DownloadParams> params,
107 scoped_ptr<ResourceEntry> entry_after_update, 107 scoped_ptr<ResourceEntry> entry_after_update,
108 base::FilePath* cache_file_path, 108 base::FilePath* cache_file_path,
109 FileError error); 109 FileError error);
110 110
111 // Cancels the job with |job_id| in the scheduler. 111 // Cancels the job with |job_id| in the scheduler.
112 void CancelJob(JobID job_id); 112 void CancelJob(JobID job_id);
113 113
114 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 114 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
115 OperationObserver* observer_; 115 OperationDelegate* delegate_;
116 JobScheduler* scheduler_; 116 JobScheduler* scheduler_;
117 internal::ResourceMetadata* metadata_; 117 internal::ResourceMetadata* metadata_;
118 internal::FileCache* cache_; 118 internal::FileCache* cache_;
119 const base::FilePath temporary_file_directory_; 119 const base::FilePath temporary_file_directory_;
120 120
121 // Note: This should remain the last member so it'll be destroyed and 121 // Note: This should remain the last member so it'll be destroyed and
122 // invalidate its weak pointers before any other members are destroyed. 122 // invalidate its weak pointers before any other members are destroyed.
123 base::WeakPtrFactory<DownloadOperation> weak_ptr_factory_; 123 base::WeakPtrFactory<DownloadOperation> weak_ptr_factory_;
124 DISALLOW_COPY_AND_ASSIGN(DownloadOperation); 124 DISALLOW_COPY_AND_ASSIGN(DownloadOperation);
125 }; 125 };
126 126
127 } // namespace file_system 127 } // namespace file_system
128 } // namespace drive 128 } // namespace drive
129 129
130 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_ 130 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698