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

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

Issue 6207005: Clarify wording around blocking 3rd party cookies and add lab to block reading of 3rd party cookies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 if (g_request_context) { 160 if (g_request_context) {
161 g_request_context->Release(); 161 g_request_context->Release();
162 g_request_context = NULL; 162 g_request_context = NULL;
163 } 163 }
164 } 164 }
165 165
166 void SetAcceptAllCookies(bool accept_all_cookies) { 166 void SetAcceptAllCookies(bool accept_all_cookies) {
167 StaticCookiePolicy::Type policy_type = accept_all_cookies ? 167 StaticCookiePolicy::Type policy_type = accept_all_cookies ?
168 StaticCookiePolicy::ALLOW_ALL_COOKIES : 168 StaticCookiePolicy::ALLOW_ALL_COOKIES :
169 StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES; 169 StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES;
170 static_cast<StaticCookiePolicy*>(g_request_context->cookie_policy())-> 170 static_cast<StaticCookiePolicy*>(g_request_context->cookie_policy())->
171 set_type(policy_type); 171 set_type(policy_type);
172 } 172 }
173 }; 173 };
174 174
175 IOThread* g_io_thread = NULL; 175 IOThread* g_io_thread = NULL;
176 176
177 //----------------------------------------------------------------------------- 177 //-----------------------------------------------------------------------------
178 178
179 struct RequestParams { 179 struct RequestParams {
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 928
929 // static 929 // static
930 scoped_refptr<base::MessageLoopProxy> 930 scoped_refptr<base::MessageLoopProxy>
931 SimpleResourceLoaderBridge::GetIoThread() { 931 SimpleResourceLoaderBridge::GetIoThread() {
932 if (!EnsureIOThread()) { 932 if (!EnsureIOThread()) {
933 LOG(DFATAL) << "Failed to create IO thread."; 933 LOG(DFATAL) << "Failed to create IO thread.";
934 return NULL; 934 return NULL;
935 } 935 }
936 return g_io_thread->message_loop_proxy(); 936 return g_io_thread->message_loop_proxy();
937 } 937 }
OLDNEW
« net/base/static_cookie_policy.h ('K') | « net/base/static_cookie_policy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698