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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer.h

Issue 1547093002: Switch to standard integer types in chrome/browser/chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_FILEAPI_FILE_STREAM_WRITER_ H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_FILE_STREAM_WRITER_ H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_FILE_STREAM_WRITER_ H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_FILE_STREAM_WRITER_ H_
7 7
8 #include "base/basictypes.h" 8 #include <stdint.h>
9
9 #include "base/files/file.h" 10 #include "base/files/file.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
13 #include "storage/browser/fileapi/file_stream_writer.h" 15 #include "storage/browser/fileapi/file_stream_writer.h"
14 #include "storage/browser/fileapi/file_system_url.h" 16 #include "storage/browser/fileapi/file_system_url.h"
15 17
16 namespace chromeos { 18 namespace chromeos {
17 namespace file_system_provider { 19 namespace file_system_provider {
18 20
19 class ProvidedFileSystemInterface; 21 class ProvidedFileSystemInterface;
20 22
21 // Implements a streamed file writer. It is lazily initialized by the first call 23 // Implements a streamed file writer. It is lazily initialized by the first call
22 // to Write(). 24 // to Write().
23 class FileStreamWriter : public storage::FileStreamWriter { 25 class FileStreamWriter : public storage::FileStreamWriter {
24 public: 26 public:
25 FileStreamWriter(const storage::FileSystemURL& url, int64 initial_offset); 27 FileStreamWriter(const storage::FileSystemURL& url, int64_t initial_offset);
26 28
27 ~FileStreamWriter() override; 29 ~FileStreamWriter() override;
28 30
29 // storage::FileStreamWriter overrides. 31 // storage::FileStreamWriter overrides.
30 int Write(net::IOBuffer* buf, 32 int Write(net::IOBuffer* buf,
31 int buf_len, 33 int buf_len,
32 const net::CompletionCallback& callback) override; 34 const net::CompletionCallback& callback) override;
33 int Cancel(const net::CompletionCallback& callback) override; 35 int Cancel(const net::CompletionCallback& callback) override;
34 int Flush(const net::CompletionCallback& callback) override; 36 int Flush(const net::CompletionCallback& callback) override;
35 37
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const base::Closure& pending_closure, 70 const base::Closure& pending_closure,
69 const net::CompletionCallback& error_callback, 71 const net::CompletionCallback& error_callback,
70 base::File::Error result); 72 base::File::Error result);
71 73
72 // Same as Write(), but called after initializing is completed. 74 // Same as Write(), but called after initializing is completed.
73 void WriteAfterInitialized(scoped_refptr<net::IOBuffer> buffer, 75 void WriteAfterInitialized(scoped_refptr<net::IOBuffer> buffer,
74 int buffer_length, 76 int buffer_length,
75 const net::CompletionCallback& callback); 77 const net::CompletionCallback& callback);
76 78
77 storage::FileSystemURL url_; 79 storage::FileSystemURL url_;
78 int64 current_offset_; 80 int64_t current_offset_;
79 scoped_refptr<OperationRunner> runner_; 81 scoped_refptr<OperationRunner> runner_;
80 State state_; 82 State state_;
81 83
82 base::WeakPtrFactory<FileStreamWriter> weak_ptr_factory_; 84 base::WeakPtrFactory<FileStreamWriter> weak_ptr_factory_;
83 DISALLOW_COPY_AND_ASSIGN(FileStreamWriter); 85 DISALLOW_COPY_AND_ASSIGN(FileStreamWriter);
84 }; 86 };
85 87
86 } // namespace file_system_provider 88 } // namespace file_system_provider
87 } // namespace chromeos 89 } // namespace chromeos
88 90
89 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_FILE_STREAM_WRIT ER_H_ 91 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FILEAPI_FILE_STREAM_WRIT ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698