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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.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, 9 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 contains an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using URLRequest, meaning it is a "simple" version 6 // The class is implemented using URLRequest, meaning it is a "simple" version
7 // that directly issues requests. The more complicated one used in the 7 // that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because URLRequest only provides an asynchronous resource loading API, this 10 // Because URLRequest only provides an asynchronous resource loading API, this
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 // factory function 560 // factory function
561 ResourceLoaderBridge* ResourceLoaderBridge::Create( 561 ResourceLoaderBridge* ResourceLoaderBridge::Create(
562 const std::string& method, 562 const std::string& method,
563 const GURL& url, 563 const GURL& url,
564 const GURL& policy_url, 564 const GURL& policy_url,
565 const GURL& referrer, 565 const GURL& referrer,
566 const std::string& frame_origin, 566 const std::string& frame_origin,
567 const std::string& main_frame_origin, 567 const std::string& main_frame_origin,
568 const std::string& headers, 568 const std::string& headers,
569 const std::string& default_mime_type,
569 int load_flags, 570 int load_flags,
570 int requestor_pid, 571 int requestor_pid,
571 ResourceType::Type request_type, 572 ResourceType::Type request_type,
572 int routing_id) { 573 int routing_id) {
573 return new ResourceLoaderBridgeImpl(method, url, policy_url, 574 return new ResourceLoaderBridgeImpl(method, url, policy_url,
574 referrer, headers, load_flags); 575 referrer, headers, load_flags);
575 } 576 }
576 577
577 // Issue the proxy resolve request on the io thread, and wait 578 // Issue the proxy resolve request on the io thread, and wait
578 // for the result. 579 // for the result.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return std::string(); 644 return std::string();
644 } 645 }
645 646
646 scoped_refptr<CookieGetter> getter = new CookieGetter(); 647 scoped_refptr<CookieGetter> getter = new CookieGetter();
647 648
648 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 649 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
649 getter.get(), &CookieGetter::Get, url)); 650 getter.get(), &CookieGetter::Get, url));
650 651
651 return getter->GetResult(); 652 return getter->GetResult();
652 } 653 }
OLDNEW
« webkit/glue/resource_handle_impl.cc ('K') | « webkit/glue/resource_loader_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698