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

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

Issue 165361: Merge 22184 - Reduce an error to a warning so as not to cause layout tests, w... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/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')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/webkit/tools/test_shell/simple_resource_loader_bridge.cc:r22184
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // Event hooks that run on the IO thread: 423 // Event hooks that run on the IO thread:
424 424
425 virtual void OnReceivedRedirect( 425 virtual void OnReceivedRedirect(
426 const GURL& new_url, 426 const GURL& new_url,
427 const ResourceLoaderBridge::ResponseInfo& info, 427 const ResourceLoaderBridge::ResponseInfo& info,
428 bool* defer_redirect) { 428 bool* defer_redirect) {
429 // TODO(darin): It would be much better if this could live in WebCore, but 429 // TODO(darin): It would be much better if this could live in WebCore, but
430 // doing so requires API changes at all levels. Similar code exists in 430 // doing so requires API changes at all levels. Similar code exists in
431 // WebCore/platform/network/cf/ResourceHandleCFNet.cpp :-( 431 // WebCore/platform/network/cf/ResourceHandleCFNet.cpp :-(
432 if (new_url.GetOrigin() != result_->url.GetOrigin()) { 432 if (new_url.GetOrigin() != result_->url.GetOrigin()) {
433 LOG(ERROR) << "Cross origin redirect denied"; 433 DLOG(WARNING) << "Cross origin redirect denied";
434 Cancel(); 434 Cancel();
435 return; 435 return;
436 } 436 }
437 result_->url = new_url; 437 result_->url = new_url;
438 } 438 }
439 439
440 virtual void OnReceivedResponse( 440 virtual void OnReceivedResponse(
441 const ResourceLoaderBridge::ResponseInfo& info, 441 const ResourceLoaderBridge::ResponseInfo& info,
442 bool content_filtered) { 442 bool content_filtered) {
443 *static_cast<ResourceLoaderBridge::ResponseInfo*>(result_) = info; 443 *static_cast<ResourceLoaderBridge::ResponseInfo*>(result_) = info;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 return std::string(); 689 return std::string();
690 } 690 }
691 691
692 scoped_refptr<CookieGetter> getter = new CookieGetter(); 692 scoped_refptr<CookieGetter> getter = new CookieGetter();
693 693
694 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 694 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
695 getter.get(), &CookieGetter::Get, url)); 695 getter.get(), &CookieGetter::Get, url));
696 696
697 return getter->GetResult(); 697 return getter->GetResult();
698 } 698 }
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