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

Side by Side Diff: chrome/plugin/chrome_plugin_host.cc

Issue 385024: Propagate the "first party for cookies" from WebKit through the resource... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Upload before checkin Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/plugin/chrome_plugin_host.h" 5 #include "chrome/plugin/chrome_plugin_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // ResourceLoaderBridge::Peer 61 // ResourceLoaderBridge::Peer
62 virtual void OnUploadProgress(uint64 position, uint64 size) { 62 virtual void OnUploadProgress(uint64 position, uint64 size) {
63 CPRR_UploadProgressFunc upload_progress = 63 CPRR_UploadProgressFunc upload_progress =
64 plugin_->functions().response_funcs->upload_progress; 64 plugin_->functions().response_funcs->upload_progress;
65 if (upload_progress) 65 if (upload_progress)
66 upload_progress(cprequest_.get(), position, size); 66 upload_progress(cprequest_.get(), position, size);
67 } 67 }
68 68
69 virtual bool OnReceivedRedirect( 69 virtual bool OnReceivedRedirect(
70 const GURL& new_url, 70 const GURL& new_url,
71 const ResourceLoaderBridge::ResponseInfo& info) { 71 const ResourceLoaderBridge::ResponseInfo& info,
72 GURL* new_first_party_for_cookies) {
72 plugin_->functions().response_funcs->received_redirect( 73 plugin_->functions().response_funcs->received_redirect(
73 cprequest_.get(), new_url.spec().c_str()); 74 cprequest_.get(), new_url.spec().c_str());
75 *new_first_party_for_cookies = GURL();
74 return true; 76 return true;
75 } 77 }
76 78
77 virtual void OnReceivedResponse( 79 virtual void OnReceivedResponse(
78 const ResourceLoaderBridge::ResponseInfo& info, 80 const ResourceLoaderBridge::ResponseInfo& info,
79 bool content_filtered) { 81 bool content_filtered) {
80 response_headers_ = info.headers; 82 response_headers_ = info.headers;
81 plugin_->functions().response_funcs->start_completed( 83 plugin_->functions().response_funcs->start_completed(
82 cprequest_.get(), CPERR_SUCCESS); 84 cprequest_.get(), CPERR_SUCCESS);
83 } 85 }
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 703
702 response_funcs.size = sizeof(response_funcs); 704 response_funcs.size = sizeof(response_funcs);
703 response_funcs.received_redirect = CPRR_ReceivedRedirect; 705 response_funcs.received_redirect = CPRR_ReceivedRedirect;
704 response_funcs.start_completed = CPRR_StartCompleted; 706 response_funcs.start_completed = CPRR_StartCompleted;
705 response_funcs.read_completed = CPRR_ReadCompleted; 707 response_funcs.read_completed = CPRR_ReadCompleted;
706 response_funcs.upload_progress = CPRR_UploadProgress; 708 response_funcs.upload_progress = CPRR_UploadProgress;
707 } 709 }
708 710
709 return &browser_funcs; 711 return &browser_funcs;
710 } 712 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698