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

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

Issue 59343002: drive: Simplify DownloadOperation by using ResourceEntry::local_id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/download_operation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 private: 80 private:
81 // Parameters for EnsureFileDownloaded. 81 // Parameters for EnsureFileDownloaded.
82 class DownloadParams; 82 class DownloadParams;
83 83
84 // Part of EnsureFileDownloaded(). Called upon the completion of precondition 84 // Part of EnsureFileDownloaded(). Called upon the completion of precondition
85 // check. 85 // check.
86 void EnsureFileDownloadedAfterCheckPreCondition( 86 void EnsureFileDownloadedAfterCheckPreCondition(
87 scoped_ptr<DownloadParams> params, 87 scoped_ptr<DownloadParams> params,
88 const ClientContext& context, 88 const ClientContext& context,
89 std::string* local_id,
90 base::FilePath* drive_file_path, 89 base::FilePath* drive_file_path,
91 base::FilePath* cache_file_path, 90 base::FilePath* cache_file_path,
92 FileError error); 91 FileError error);
93 92
94 // Part of EnsureFileDownloaded(). Called when it is ready to start 93 // Part of EnsureFileDownloaded(). Called when it is ready to start
95 // downloading the file. 94 // downloading the file.
96 void EnsureFileDownloadedAfterPrepareForDownloadFile( 95 void EnsureFileDownloadedAfterPrepareForDownloadFile(
97 scoped_ptr<DownloadParams> params, 96 scoped_ptr<DownloadParams> params,
98 const ClientContext& context, 97 const ClientContext& context,
99 const std::string& local_id,
100 const base::FilePath& drive_file_path, 98 const base::FilePath& drive_file_path,
101 base::FilePath* temp_download_file_path, 99 base::FilePath* temp_download_file_path,
102 FileError error); 100 FileError error);
103 101
104 // Part of EnsureFileDownloaded(). Called after the actual downloading. 102 // Part of EnsureFileDownloaded(). Called after the actual downloading.
105 void EnsureFileDownloadedAfterDownloadFile( 103 void EnsureFileDownloadedAfterDownloadFile(
106 const base::FilePath& drive_file_path, 104 const base::FilePath& drive_file_path,
107 const std::string& local_id,
108 scoped_ptr<DownloadParams> params, 105 scoped_ptr<DownloadParams> params,
109 google_apis::GDataErrorCode gdata_error, 106 google_apis::GDataErrorCode gdata_error,
110 const base::FilePath& downloaded_file_path); 107 const base::FilePath& downloaded_file_path);
111 108
112 // Part of EnsureFileDownloaded(). Called after updating local state is 109 // Part of EnsureFileDownloaded(). Called after updating local state is
113 // completed. 110 // completed.
114 void EnsureFileDownloadedAfterUpdateLocalState( 111 void EnsureFileDownloadedAfterUpdateLocalState(
115 const base::FilePath& file_path, 112 const base::FilePath& file_path,
116 scoped_ptr<DownloadParams> params, 113 scoped_ptr<DownloadParams> params,
117 base::FilePath* cache_file_path, 114 base::FilePath* cache_file_path,
(...skipping 12 matching lines...) Expand all
130 // Note: This should remain the last member so it'll be destroyed and 127 // Note: This should remain the last member so it'll be destroyed and
131 // invalidate its weak pointers before any other members are destroyed. 128 // invalidate its weak pointers before any other members are destroyed.
132 base::WeakPtrFactory<DownloadOperation> weak_ptr_factory_; 129 base::WeakPtrFactory<DownloadOperation> weak_ptr_factory_;
133 DISALLOW_COPY_AND_ASSIGN(DownloadOperation); 130 DISALLOW_COPY_AND_ASSIGN(DownloadOperation);
134 }; 131 };
135 132
136 } // namespace file_system 133 } // namespace file_system
137 } // namespace drive 134 } // namespace drive
138 135
139 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_ 136 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DOWNLOAD_OPERATION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/download_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698