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

Side by Side Diff: content/shell/shell_browser_context.cc

Issue 10912132: Move ProxyConfigService construction onto the IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra blank line Created 8 years, 2 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) 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698