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

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

Issue 195077: Tell the AppCacheService which request context to use when fetching resources... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/test_shell/simple_appcache_system.cc ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 IOThread() : base::Thread("IOThread") { 68 IOThread() : base::Thread("IOThread") {
69 } 69 }
70 70
71 ~IOThread() { 71 ~IOThread() {
72 // We cannot rely on our base class to stop the thread since we want our 72 // We cannot rely on our base class to stop the thread since we want our
73 // CleanUp function to run. 73 // CleanUp function to run.
74 Stop(); 74 Stop();
75 } 75 }
76 76
77 virtual void Init() { 77 virtual void Init() {
78 SimpleAppCacheSystem::InitializeOnIOThread(); 78 SimpleAppCacheSystem::InitializeOnIOThread(request_context);
79 } 79 }
80 80
81 virtual void CleanUp() { 81 virtual void CleanUp() {
82 if (request_context) { 82 if (request_context) {
83 request_context->Release(); 83 request_context->Release();
84 request_context = NULL; 84 request_context = NULL;
85 } 85 }
86 } 86 }
87 }; 87 };
88 88
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 options.message_loop_type = MessageLoop::TYPE_IO; 722 options.message_loop_type = MessageLoop::TYPE_IO;
723 return io_thread->StartWithOptions(options); 723 return io_thread->StartWithOptions(options);
724 } 724 }
725 725
726 // static 726 // static
727 void SimpleResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) { 727 void SimpleResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) {
728 CookiePolicy::Type policy_type = accept_all_cookies ? 728 CookiePolicy::Type policy_type = accept_all_cookies ?
729 CookiePolicy::ALLOW_ALL_COOKIES : CookiePolicy::BLOCK_THIRD_PARTY_COOKIES; 729 CookiePolicy::ALLOW_ALL_COOKIES : CookiePolicy::BLOCK_THIRD_PARTY_COOKIES;
730 request_context->cookie_policy()->set_type(policy_type); 730 request_context->cookie_policy()->set_type(policy_type);
731 } 731 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/simple_appcache_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698