OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 namespace content { | 28 namespace content { |
29 | 29 |
30 ShellBrowserContext::ShellBrowserContext(bool off_the_record) | 30 ShellBrowserContext::ShellBrowserContext(bool off_the_record) |
31 : off_the_record_(off_the_record), | 31 : off_the_record_(off_the_record), |
32 ignore_certificate_errors_(false) { | 32 ignore_certificate_errors_(false) { |
33 InitWhileIOAllowed(); | 33 InitWhileIOAllowed(); |
34 } | 34 } |
35 | 35 |
36 ShellBrowserContext::~ShellBrowserContext() { | 36 ShellBrowserContext::~ShellBrowserContext() { |
37 if (resource_context_.get()) { | 37 if (resource_context_.get()) { |
| 38 resource_context_->StartTearDown(); |
38 BrowserThread::DeleteSoon( | 39 BrowserThread::DeleteSoon( |
39 BrowserThread::IO, FROM_HERE, resource_context_.release()); | 40 BrowserThread::IO, FROM_HERE, resource_context_.release()); |
40 } | 41 } |
41 } | 42 } |
42 | 43 |
43 void ShellBrowserContext::InitWhileIOAllowed() { | 44 void ShellBrowserContext::InitWhileIOAllowed() { |
44 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 45 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
45 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) | 46 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) |
46 ignore_certificate_errors_ = true; | 47 ignore_certificate_errors_ = true; |
47 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) { | 48 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 SpeechRecognitionPreferences* | 153 SpeechRecognitionPreferences* |
153 ShellBrowserContext::GetSpeechRecognitionPreferences() { | 154 ShellBrowserContext::GetSpeechRecognitionPreferences() { |
154 return NULL; | 155 return NULL; |
155 } | 156 } |
156 | 157 |
157 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 158 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
158 return NULL; | 159 return NULL; |
159 } | 160 } |
160 | 161 |
161 } // namespace content | 162 } // namespace content |
OLD | NEW |