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

Side by Side Diff: content/browser/loader/redirect_to_file_resource_handler.cc

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed copyright Created 5 years, 11 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 "content/browser/loader/redirect_to_file_resource_handler.h" 5 #include "content/browser/loader/redirect_to_file_resource_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "content/browser/loader/resource_request_info_impl.h" 10 #include "content/browser/loader/resource_request_info_impl.h"
11 #include "content/browser/loader/temporary_file_stream.h" 11 #include "content/browser/loader/temporary_file_stream.h"
12 #include "content/public/browser/resource_controller.h" 12 #include "content/public/browser/resource_controller.h"
13 #include "content/public/common/resource_response.h" 13 #include "content/public/common/resource_response.h"
14 #include "net/base/file_stream.h" 14 #include "net/base/file_stream.h"
15 #include "net/base/io_buffer.h" 15 #include "net/base/io_buffer.h"
16 #include "net/base/mime_sniffer.h" 16 #include "net/base/mime_sniffer.h"
17 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
18 #include "storage/common/blob/shareable_file_reference.h" 18 #include "storage/browser/blob/shareable_file_reference.h"
19 19
20 using storage::ShareableFileReference; 20 using storage::ShareableFileReference;
21 21
22 namespace { 22 namespace {
23 23
24 // This class is similar to identically named classes in AsyncResourceHandler 24 // This class is similar to identically named classes in AsyncResourceHandler
25 // and BufferedResourceHandler, but not quite. 25 // and BufferedResourceHandler, but not quite.
26 // TODO(ncbray) generalize and unify these cases? 26 // TODO(ncbray) generalize and unify these cases?
27 // In general, it's a bad idea to point to a subbuffer (particularly with 27 // In general, it's a bad idea to point to a subbuffer (particularly with
28 // GrowableIOBuffer) because the backing IOBuffer may realloc its data. In this 28 // GrowableIOBuffer) because the backing IOBuffer may realloc its data. In this
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 void RedirectToFileResourceHandler::ResumeIfDeferred() { 361 void RedirectToFileResourceHandler::ResumeIfDeferred() {
362 if (did_defer_) { 362 if (did_defer_) {
363 did_defer_ = false; 363 did_defer_ = false;
364 controller()->Resume(); 364 controller()->Resume();
365 } 365 }
366 } 366 }
367 367
368 } // namespace content 368 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698