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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/files/file.h" 12 #include "base/files/file.h"
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/chromeos/file_system_provider/operations/operation.h" 15 #include "chrome/browser/chromeos/file_system_provider/operations/operation.h"
15 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h" 16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h"
16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h" 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h"
17 #include "chrome/browser/chromeos/file_system_provider/request_value.h" 18 #include "chrome/browser/chromeos/file_system_provider/request_value.h"
18 #include "net/base/io_buffer.h" 19 #include "net/base/io_buffer.h"
19 #include "storage/browser/fileapi/async_file_util.h" 20 #include "storage/browser/fileapi/async_file_util.h"
20 21
21 namespace base { 22 namespace base {
22 class FilePath; 23 class FilePath;
23 } // namespace base 24 } // namespace base
(...skipping 16 matching lines...) Expand all
40 int file_handle, 41 int file_handle,
41 scoped_refptr<net::IOBuffer> buffer, 42 scoped_refptr<net::IOBuffer> buffer,
42 int64_t offset, 43 int64_t offset,
43 int length, 44 int length,
44 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback); 45 const ProvidedFileSystemInterface::ReadChunkReceivedCallback& callback);
45 ~ReadFile() override; 46 ~ReadFile() override;
46 47
47 // Operation overrides. 48 // Operation overrides.
48 bool Execute(int request_id) override; 49 bool Execute(int request_id) override;
49 void OnSuccess(int request_id, 50 void OnSuccess(int request_id,
50 scoped_ptr<RequestValue> result, 51 std::unique_ptr<RequestValue> result,
51 bool has_more) override; 52 bool has_more) override;
52 void OnError(int request_id, 53 void OnError(int request_id,
53 scoped_ptr<RequestValue> result, 54 std::unique_ptr<RequestValue> result,
54 base::File::Error error) override; 55 base::File::Error error) override;
55 56
56 private: 57 private:
57 int file_handle_; 58 int file_handle_;
58 scoped_refptr<net::IOBuffer> buffer_; 59 scoped_refptr<net::IOBuffer> buffer_;
59 int64_t offset_; 60 int64_t offset_;
60 int length_; 61 int length_;
61 int64_t current_offset_; 62 int64_t current_offset_;
62 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_; 63 const ProvidedFileSystemInterface::ReadChunkReceivedCallback callback_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(ReadFile); 65 DISALLOW_COPY_AND_ASSIGN(ReadFile);
65 }; 66 };
66 67
67 } // namespace operations 68 } // namespace operations
68 } // namespace file_system_provider 69 } // namespace file_system_provider
69 } // namespace chromeos 70 } // namespace chromeos
70 71
71 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_ 72 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_READ_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698