OLD | NEW |
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 #include "chrome/browser/net/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/message_loop_proxy.h" |
9 #include "base/string_util.h" | 10 #include "base/string_util.h" |
10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/chrome_thread.h" | 12 #include "chrome/browser/chrome_thread.h" |
12 #include "chrome/browser/extensions/extensions_service.h" | 13 #include "chrome/browser/extensions/extensions_service.h" |
13 #include "chrome/browser/extensions/user_script_master.h" | 14 #include "chrome/browser/extensions/user_script_master.h" |
14 #include "chrome/browser/io_thread.h" | 15 #include "chrome/browser/io_thread.h" |
15 #include "chrome/browser/net/chrome_cookie_notification_details.h" | 16 #include "chrome/browser/net/chrome_cookie_notification_details.h" |
16 #include "chrome/browser/net/chrome_net_log.h" | 17 #include "chrome/browser/net/chrome_net_log.h" |
17 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" | 18 #include "chrome/browser/net/sqlite_persistent_cookie_store.h" |
18 #include "chrome/browser/net/dns_global.h" | 19 #include "chrome/browser/net/dns_global.h" |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 NewRunnableMethod(this, | 544 NewRunnableMethod(this, |
544 &ChromeURLRequestContextGetter::GetCookieStoreAsyncHelper, | 545 &ChromeURLRequestContextGetter::GetCookieStoreAsyncHelper, |
545 &completion, | 546 &completion, |
546 &result)); | 547 &result)); |
547 | 548 |
548 completion.Wait(); | 549 completion.Wait(); |
549 DCHECK(result); | 550 DCHECK(result); |
550 return result; | 551 return result; |
551 } | 552 } |
552 | 553 |
| 554 scoped_refptr<MessageLoopProxy> |
| 555 ChromeURLRequestContextGetter::GetIOMessageLoopProxy() { |
| 556 return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO); |
| 557 } |
| 558 |
553 // static | 559 // static |
554 ChromeURLRequestContextGetter* ChromeURLRequestContextGetter::CreateOriginal( | 560 ChromeURLRequestContextGetter* ChromeURLRequestContextGetter::CreateOriginal( |
555 Profile* profile, const FilePath& cookie_store_path, | 561 Profile* profile, const FilePath& cookie_store_path, |
556 const FilePath& disk_cache_path, int cache_size) { | 562 const FilePath& disk_cache_path, int cache_size) { |
557 DCHECK(!profile->IsOffTheRecord()); | 563 DCHECK(!profile->IsOffTheRecord()); |
558 return new ChromeURLRequestContextGetter( | 564 return new ChromeURLRequestContextGetter( |
559 profile, | 565 profile, |
560 new FactoryForOriginal(profile, | 566 new FactoryForOriginal(profile, |
561 cookie_store_path, | 567 cookie_store_path, |
562 disk_cache_path, | 568 disk_cache_path, |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 } | 1038 } |
1033 | 1039 |
1034 if (command_line.HasSwitch(switches::kProxyBypassList)) { | 1040 if (command_line.HasSwitch(switches::kProxyBypassList)) { |
1035 proxy_config->proxy_rules().bypass_rules.ParseFromString( | 1041 proxy_config->proxy_rules().bypass_rules.ParseFromString( |
1036 WideToASCII(command_line.GetSwitchValue( | 1042 WideToASCII(command_line.GetSwitchValue( |
1037 switches::kProxyBypassList))); | 1043 switches::kProxyBypassList))); |
1038 } | 1044 } |
1039 | 1045 |
1040 return proxy_config; | 1046 return proxy_config; |
1041 } | 1047 } |
OLD | NEW |