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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/read_file.h

Issue 335753004: [fsp] Cleanup handling errors for operation requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 6 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 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_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 int64 offset, 39 int64 offset,
40 int length, 40 int length,
41 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback); 41 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback);
42 virtual ~ReadFile(); 42 virtual ~ReadFile();
43 43
44 // Operation overrides. 44 // Operation overrides.
45 virtual bool Execute(int request_id) OVERRIDE; 45 virtual bool Execute(int request_id) OVERRIDE;
46 virtual void OnSuccess(int request_id, 46 virtual void OnSuccess(int request_id,
47 scoped_ptr<RequestValue> result, 47 scoped_ptr<RequestValue> result,
48 bool has_more) OVERRIDE; 48 bool has_more) OVERRIDE;
49 virtual void OnError(int request_id, base::File::Error error) OVERRIDE; 49 virtual void OnError(int request_id,
50 scoped_ptr<RequestValue> result,
51 base::File::Error error) OVERRIDE;
50 52
51 private: 53 private:
52 int file_handle_; 54 int file_handle_;
53 scoped_refptr<net::IOBuffer> buffer_; 55 scoped_refptr<net::IOBuffer> buffer_;
54 int64 offset_; 56 int64 offset_;
55 int length_; 57 int length_;
56 int64 current_offset_; 58 int64 current_offset_;
57 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_; 59 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_;
58 60
59 DISALLOW_COPY_AND_ASSIGN(ReadFile); 61 DISALLOW_COPY_AND_ASSIGN(ReadFile);
60 }; 62 };
61 63
62 } // namespace operations 64 } // namespace operations
63 } // namespace file_system_provider 65 } // namespace file_system_provider
64 } // namespace chromeos 66 } // namespace chromeos
65 67
66 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698