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

Side by Side Diff: chrome/browser/chromeos/drive/fileapi/webkit_file_stream_writer_impl.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: iwyu fixes 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_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/callback.h" 12 #include "base/callback.h"
11 #include "base/files/file.h" 13 #include "base/files/file.h"
12 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
13 #include "base/macros.h" 15 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
16 #include "storage/browser/fileapi/file_stream_writer.h" 17 #include "storage/browser/fileapi/file_stream_writer.h"
17 18
18 namespace base { 19 namespace base {
19 class TaskRunner; 20 class TaskRunner;
20 } // namespace base 21 } // namespace base
21 22
22 namespace net { 23 namespace net {
23 class IOBuffer; 24 class IOBuffer;
24 } // namespace net 25 } // namespace net
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 int buf_len, 63 int buf_len,
63 base::File::Error open_result, 64 base::File::Error open_result,
64 const base::FilePath& local_path, 65 const base::FilePath& local_path,
65 const base::Closure& close_callback_on_ui_thread); 66 const base::Closure& close_callback_on_ui_thread);
66 67
67 FileSystemGetter file_system_getter_; 68 FileSystemGetter file_system_getter_;
68 scoped_refptr<base::TaskRunner> file_task_runner_; 69 scoped_refptr<base::TaskRunner> file_task_runner_;
69 const base::FilePath file_path_; 70 const base::FilePath file_path_;
70 const int64_t offset_; 71 const int64_t offset_;
71 72
72 scoped_ptr<storage::FileStreamWriter> local_file_writer_; 73 std::unique_ptr<storage::FileStreamWriter> local_file_writer_;
73 base::Closure close_callback_on_ui_thread_; 74 base::Closure close_callback_on_ui_thread_;
74 net::CompletionCallback pending_write_callback_; 75 net::CompletionCallback pending_write_callback_;
75 net::CompletionCallback pending_cancel_callback_; 76 net::CompletionCallback pending_cancel_callback_;
76 77
77 // Note: This should remain the last member so it'll be destroyed and 78 // Note: This should remain the last member so it'll be destroyed and
78 // invalidate the weak pointers before any other members are destroyed. 79 // invalidate the weak pointers before any other members are destroyed.
79 base::WeakPtrFactory<WebkitFileStreamWriterImpl> weak_ptr_factory_; 80 base::WeakPtrFactory<WebkitFileStreamWriterImpl> weak_ptr_factory_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(WebkitFileStreamWriterImpl); 82 DISALLOW_COPY_AND_ASSIGN(WebkitFileStreamWriterImpl);
82 }; 83 };
83 84
84 } // namespace internal 85 } // namespace internal
85 } // namespace drive 86 } // namespace drive
86 87
87 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_ H_ 88 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILEAPI_WEBKIT_FILE_STREAM_WRITER_IMPL_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698