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

Side by Side Diff: net/base/file_stream_context.h

Issue 211483004: Remove some PlatformFile instances from ChromeOS Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change FileStream destruction logic Created 6 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/drive/local_file_reader.cc ('k') | net/base/file_stream_context.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file defines FileStream::Context class. 5 // This file defines FileStream::Context class.
6 // The general design of FileStream is as follows: file_stream.h defines 6 // The general design of FileStream is as follows: file_stream.h defines
7 // FileStream class which basically is just an "wrapper" not containing any 7 // FileStream class which basically is just an "wrapper" not containing any
8 // specific implementation details. It re-routes all its method calls to 8 // specific implementation details. It re-routes all its method calls to
9 // the instance of FileStream::Context (FileStream holds a scoped_ptr to 9 // the instance of FileStream::Context (FileStream holds a scoped_ptr to
10 // FileStream::Context instance). Context was extracted into a different class 10 // FileStream::Context instance). Context was extracted into a different class
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 OpenResult OpenFileImpl(const base::FilePath& path, int open_flags); 162 OpenResult OpenFileImpl(const base::FilePath& path, int open_flags);
163 163
164 IOResult CloseFileImpl(); 164 IOResult CloseFileImpl();
165 165
166 void ProcessOpenError(const IOResult& result); 166 void ProcessOpenError(const IOResult& result);
167 void OnOpenCompleted(const CompletionCallback& callback, 167 void OnOpenCompleted(const CompletionCallback& callback,
168 OpenResult open_result); 168 OpenResult open_result);
169 169
170 void CloseAndDelete(); 170 void CloseAndDelete();
171 void OnCloseCompleted();
172 171
173 Int64CompletionCallback IntToInt64(const CompletionCallback& callback); 172 Int64CompletionCallback IntToInt64(const CompletionCallback& callback);
174 173
175 // Called when asynchronous Seek() is completed. 174 // Called when asynchronous Seek() is completed.
176 // Reports error if needed and calls callback. 175 // Reports error if needed and calls callback.
177 void ProcessAsyncResult(const Int64CompletionCallback& callback, 176 void ProcessAsyncResult(const Int64CompletionCallback& callback,
178 FileErrorSource source, 177 FileErrorSource source,
179 const IOResult& result); 178 const IOResult& result);
180 179
181 // Called when asynchronous Open() or Seek() 180 // Called when asynchronous Open() or Seek()
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 FileErrorSource error_source_; 241 FileErrorSource error_source_;
243 #endif 242 #endif
244 243
245 DISALLOW_COPY_AND_ASSIGN(Context); 244 DISALLOW_COPY_AND_ASSIGN(Context);
246 }; 245 };
247 246
248 } // namespace net 247 } // namespace net
249 248
250 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_ 249 #endif // NET_BASE_FILE_STREAM_CONTEXT_H_
251 250
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/local_file_reader.cc ('k') | net/base/file_stream_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698