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

Side by Side Diff: webkit/blob/view_blob_internals_job.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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 "webkit/blob/view_blob_internals_job.h" 5 #include "webkit/blob/view_blob_internals_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "net/base/escape.h" 17 #include "net/base/escape.h"
18 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
19 #include "net/url_request/url_request.h" 19 #include "net/url_request/url_request.h"
20 #include "net/url_request/url_request_context.h"
20 #include "webkit/blob/blob_data.h" 21 #include "webkit/blob/blob_data.h"
21 #include "webkit/blob/blob_storage_controller.h" 22 #include "webkit/blob/blob_storage_controller.h"
22 23
23 namespace { 24 namespace {
24 25
25 const char kEmptyBlobStorageMessage[] = "No available blob data."; 26 const char kEmptyBlobStorageMessage[] = "No available blob data.";
26 const char kRemove[] = "Remove"; 27 const char kRemove[] = "Remove";
27 const char kContentType[] = "Content Type: "; 28 const char kContentType[] = "Content Type: ";
28 const char kContentDisposition[] = "Content Disposition: "; 29 const char kContentDisposition[] = "Content Disposition: ";
29 const char kCount[] = "Count: "; 30 const char kCount[] = "Count: ";
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 escaped_command.c_str(), 93 escaped_command.c_str(),
93 title.c_str()); 94 title.c_str());
94 } 95 }
95 96
96 } // namespace 97 } // namespace
97 98
98 namespace webkit_blob { 99 namespace webkit_blob {
99 100
100 ViewBlobInternalsJob::ViewBlobInternalsJob( 101 ViewBlobInternalsJob::ViewBlobInternalsJob(
101 net::URLRequest* request, BlobStorageController* blob_storage_controller) 102 net::URLRequest* request, BlobStorageController* blob_storage_controller)
102 : net::URLRequestSimpleJob(request), 103 : net::URLRequestSimpleJob(request, request->context()->network_delegate()),
103 blob_storage_controller_(blob_storage_controller), 104 blob_storage_controller_(blob_storage_controller),
104 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 105 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
105 } 106 }
106 107
107 ViewBlobInternalsJob::~ViewBlobInternalsJob() { 108 ViewBlobInternalsJob::~ViewBlobInternalsJob() {
108 } 109 }
109 110
110 void ViewBlobInternalsJob::Start() { 111 void ViewBlobInternalsJob::Start() {
111 MessageLoop::current()->PostTask( 112 MessageLoop::current()->PostTask(
112 FROM_HERE, base::Bind(&ViewBlobInternalsJob::DoWorkAsync, 113 FROM_HERE, base::Bind(&ViewBlobInternalsJob::DoWorkAsync,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 230 }
230 231
231 if (has_multi_items) 232 if (has_multi_items)
232 EndHTMLList(out); 233 EndHTMLList(out);
233 } 234 }
234 235
235 EndHTMLList(out); 236 EndHTMLList(out);
236 } 237 }
237 238
238 } // namespace webkit_blob 239 } // namespace webkit_blob
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698