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

Side by Side Diff: webkit/glue/resource_handle_impl.cc

Issue 55049: Add the ability to specify a default MIME type when loading a resource. We'l... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 8 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file replaces WebCore/platform/network/win/ResourceHandleWin.cpp with a 5 // This file replaces WebCore/platform/network/win/ResourceHandleWin.cpp with a
6 // platform-neutral implementation that simply defers almost entirely to 6 // platform-neutral implementation that simply defers almost entirely to
7 // ResouceLoaderBridge. 7 // ResouceLoaderBridge.
8 // 8 //
9 // This uses the same ResourceHandle.h header file that the rest of WebKit 9 // This uses the same ResourceHandle.h header file that the rest of WebKit
10 // uses, allowing us to avoid complicated changes. Our specific things are 10 // uses, allowing us to avoid complicated changes. Our specific things are
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // TODO(brettw) this should take parameter encoding into account when 418 // TODO(brettw) this should take parameter encoding into account when
419 // creating the GURLs. 419 // creating the GURLs.
420 bridge_.reset(ResourceLoaderBridge::Create( 420 bridge_.reset(ResourceLoaderBridge::Create(
421 webkit_glue::CStringToStdString(method), 421 webkit_glue::CStringToStdString(method),
422 url, 422 url,
423 webkit_glue::KURLToGURL(request_.policyURL()), 423 webkit_glue::KURLToGURL(request_.policyURL()),
424 referrer, 424 referrer,
425 frame_origin, 425 frame_origin,
426 main_frame_origin, 426 main_frame_origin,
427 webkit_glue::CStringToStdString(headerBuf.latin1()), 427 webkit_glue::CStringToStdString(headerBuf.latin1()),
428 // TODO(abarth): webkit_glue::StringToStdString(
429 // request_.defaultMimeType());
wtc 2009/03/28 00:45:35 Is this change blocked by your upstream WebKit pat
abarth-chromium 2009/03/28 07:10:45 We can land this now, but it won't do anything yet
430 "",
428 load_flags_, 431 load_flags_,
429 requestor_pid, 432 requestor_pid,
430 FromTargetType(request_.targetType()), 433 FromTargetType(request_.targetType()),
431 request_.requestorID())); 434 request_.requestorID()));
432 if (!bridge_.get()) 435 if (!bridge_.get())
433 return false; 436 return false;
434 437
435 if (request_.httpBody()) { 438 if (request_.httpBody()) {
436 // GET and HEAD requests shouldn't have http bodies. 439 // GET and HEAD requests shouldn't have http bodies.
437 DCHECK(method != "GET" && method != "HEAD"); 440 DCHECK(method != "GET" && method != "HEAD");
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 // if the request cannot be serviced from cache. We force the 'DontLoad' 755 // if the request cannot be serviced from cache. We force the 'DontLoad'
753 // cache policy at this point to ensure that we never hit the network for 756 // cache policy at this point to ensure that we never hit the network for
754 // this request. 757 // this request.
755 // 758 //
756 DCHECK(request.httpMethod() == "POST"); 759 DCHECK(request.httpMethod() == "POST");
757 request.setCachePolicy(ReturnCacheDataDontLoad); 760 request.setCachePolicy(ReturnCacheDataDontLoad);
758 return true; 761 return true;
759 } 762 }
760 763
761 } // namespace WebCore 764 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698