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

Side by Side Diff: content/browser/net/url_request_slow_download_job.cc

Issue 8340028: Salient parts of http://codereview.chromium.org/8392042/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « content/browser/mach_broker_mac.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/net/url_request_slow_download_job.h" 5 #include "content/browser/net/url_request_slow_download_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h"
10 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
11 #include "base/string_util.h" 12 #include "content/public/browser/browser_thread.h"
12 #include "content/browser/browser_thread.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "net/base/io_buffer.h" 14 #include "net/base/io_buffer.h"
15 #include "net/http/http_response_headers.h" 15 #include "net/http/http_response_headers.h"
16 #include "net/url_request/url_request.h" 16 #include "net/url_request/url_request.h"
17 #include "net/url_request/url_request_filter.h" 17 #include "net/url_request/url_request_filter.h"
18 18
19 const char URLRequestSlowDownloadJob::kUnknownSizeUrl[] = 19 const char URLRequestSlowDownloadJob::kUnknownSizeUrl[] =
20 "http://url.handled.by.slow.download/download-unknown-size"; 20 "http://url.handled.by.slow.download/download-unknown-size";
21 const char URLRequestSlowDownloadJob::kKnownSizeUrl[] = 21 const char URLRequestSlowDownloadJob::kKnownSizeUrl[] =
22 "http://url.handled.by.slow.download/download-known-size"; 22 "http://url.handled.by.slow.download/download-known-size";
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // ParseRawHeaders expects \0 to end each header line. 185 // ParseRawHeaders expects \0 to end each header line.
186 ReplaceSubstringsAfterOffset(&raw_headers, 0, "\n", std::string("\0", 1)); 186 ReplaceSubstringsAfterOffset(&raw_headers, 0, "\n", std::string("\0", 1));
187 info->headers = new net::HttpResponseHeaders(raw_headers); 187 info->headers = new net::HttpResponseHeaders(raw_headers);
188 } 188 }
189 189
190 bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) const { 190 bool URLRequestSlowDownloadJob::GetMimeType(std::string* mime_type) const {
191 net::HttpResponseInfo info; 191 net::HttpResponseInfo info;
192 GetResponseInfoConst(&info); 192 GetResponseInfoConst(&info);
193 return info.headers && info.headers->GetMimeType(mime_type); 193 return info.headers && info.headers->GetMimeType(mime_type);
194 } 194 }
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698