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

Side by Side Diff: chrome/browser/media_galleries/fileapi/readahead_file_stream_reader.h

Issue 908833002: Move some file api files to fileapi folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "net/base/io_buffer.h" 11 #include "net/base/io_buffer.h"
12 #include "storage/browser/blob/file_stream_reader.h" 12 #include "storage/browser/fileapi/file_stream_reader.h"
13 13
14 // Wraps a source FileStreamReader with a readahead buffer. 14 // Wraps a source FileStreamReader with a readahead buffer.
15 class ReadaheadFileStreamReader 15 class ReadaheadFileStreamReader
16 : public NON_EXPORTED_BASE(storage::FileStreamReader) { 16 : public NON_EXPORTED_BASE(storage::FileStreamReader) {
17 public: 17 public:
18 // Takes ownership of |source|. 18 // Takes ownership of |source|.
19 explicit ReadaheadFileStreamReader(storage::FileStreamReader* source); 19 explicit ReadaheadFileStreamReader(storage::FileStreamReader* source);
20 20
21 ~ReadaheadFileStreamReader() override; 21 ~ReadaheadFileStreamReader() override;
22 22
(...skipping 30 matching lines...) Expand all
53 // reading and fill the cache. 53 // reading and fill the cache.
54 scoped_refptr<net::DrainableIOBuffer> pending_sink_buffer_; 54 scoped_refptr<net::DrainableIOBuffer> pending_sink_buffer_;
55 net::CompletionCallback pending_read_callback_; 55 net::CompletionCallback pending_read_callback_;
56 56
57 base::WeakPtrFactory<ReadaheadFileStreamReader> weak_factory_; 57 base::WeakPtrFactory<ReadaheadFileStreamReader> weak_factory_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(ReadaheadFileStreamReader); 59 DISALLOW_COPY_AND_ASSIGN(ReadaheadFileStreamReader);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H _ 62 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_READAHEAD_FILE_STREAM_READER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698