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

Side by Side Diff: storage/browser/fileapi/sandbox_file_stream_writer.cc

Issue 1139323003: Discard duplicate includes of files from storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "storage/browser/fileapi/sandbox_file_stream_writer.h" 5 #include "storage/browser/fileapi/sandbox_file_stream_writer.h"
6 6
7 #include "base/files/file_util_proxy.h" 7 #include "base/files/file_util_proxy.h"
8 #include "base/sequenced_task_runner.h" 8 #include "base/sequenced_task_runner.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "storage/browser/fileapi/file_observers.h" 11 #include "storage/browser/fileapi/file_observers.h"
12 #include "storage/browser/fileapi/file_stream_reader.h" 12 #include "storage/browser/fileapi/file_stream_reader.h"
13 #include "storage/browser/fileapi/file_stream_writer.h"
14 #include "storage/browser/fileapi/file_system_context.h" 13 #include "storage/browser/fileapi/file_system_context.h"
15 #include "storage/browser/fileapi/file_system_operation_runner.h" 14 #include "storage/browser/fileapi/file_system_operation_runner.h"
16 #include "storage/browser/quota/quota_manager_proxy.h" 15 #include "storage/browser/quota/quota_manager_proxy.h"
17 #include "storage/common/fileapi/file_system_util.h" 16 #include "storage/common/fileapi/file_system_util.h"
18 17
19 namespace storage { 18 namespace storage {
20 19
21 namespace { 20 namespace {
22 21
23 // Adjust the |quota| value in overwriting case (i.e. |file_size| > 0 and 22 // Adjust the |quota| value in overwriting case (i.e. |file_size| > 0 and
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 DCHECK(cancel_callback_.is_null()); 237 DCHECK(cancel_callback_.is_null());
239 238
240 // Write() is not called yet, so there's nothing to flush. 239 // Write() is not called yet, so there's nothing to flush.
241 if (!local_file_writer_) 240 if (!local_file_writer_)
242 return net::OK; 241 return net::OK;
243 242
244 return local_file_writer_->Flush(callback); 243 return local_file_writer_->Flush(callback);
245 } 244 }
246 245
247 } // namespace storage 246 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698