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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 160423: Reduce an error to a warning so as not to cause layout tests, which assert th... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | 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) 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // Event hooks that run on the IO thread: 422 // Event hooks that run on the IO thread:
423 423
424 virtual void OnReceivedRedirect( 424 virtual void OnReceivedRedirect(
425 const GURL& new_url, 425 const GURL& new_url,
426 const ResourceLoaderBridge::ResponseInfo& info, 426 const ResourceLoaderBridge::ResponseInfo& info,
427 bool* defer_redirect) { 427 bool* defer_redirect) {
428 // TODO(darin): It would be much better if this could live in WebCore, but 428 // TODO(darin): It would be much better if this could live in WebCore, but
429 // doing so requires API changes at all levels. Similar code exists in 429 // doing so requires API changes at all levels. Similar code exists in
430 // WebCore/platform/network/cf/ResourceHandleCFNet.cpp :-( 430 // WebCore/platform/network/cf/ResourceHandleCFNet.cpp :-(
431 if (new_url.GetOrigin() != result_->url.GetOrigin()) { 431 if (new_url.GetOrigin() != result_->url.GetOrigin()) {
432 LOG(ERROR) << "Cross origin redirect denied"; 432 DLOG(WARNING) << "Cross origin redirect denied";
433 Cancel(); 433 Cancel();
434 return; 434 return;
435 } 435 }
436 result_->url = new_url; 436 result_->url = new_url;
437 } 437 }
438 438
439 virtual void OnReceivedResponse( 439 virtual void OnReceivedResponse(
440 const ResourceLoaderBridge::ResponseInfo& info, 440 const ResourceLoaderBridge::ResponseInfo& info,
441 bool content_filtered) { 441 bool content_filtered) {
442 *static_cast<ResourceLoaderBridge::ResponseInfo*>(result_) = info; 442 *static_cast<ResourceLoaderBridge::ResponseInfo*>(result_) = info;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 return std::string(); 688 return std::string();
689 } 689 }
690 690
691 scoped_refptr<CookieGetter> getter = new CookieGetter(); 691 scoped_refptr<CookieGetter> getter = new CookieGetter();
692 692
693 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 693 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
694 getter.get(), &CookieGetter::Get, url)); 694 getter.get(), &CookieGetter::Get, url));
695 695
696 return getter->GetResult(); 696 return getter->GetResult();
697 } 697 }
OLDNEW
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698