| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/shell_browser_context.h" | 5 #include "content/shell/browser/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/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 ShellBrowserContext::~ShellBrowserContext() { | 59 ShellBrowserContext::~ShellBrowserContext() { |
| 60 if (resource_context_) { | 60 if (resource_context_) { |
| 61 BrowserThread::DeleteSoon( | 61 BrowserThread::DeleteSoon( |
| 62 BrowserThread::IO, FROM_HERE, resource_context_.release()); | 62 BrowserThread::IO, FROM_HERE, resource_context_.release()); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 void ShellBrowserContext::InitWhileIOAllowed() { | 66 void ShellBrowserContext::InitWhileIOAllowed() { |
| 67 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 67 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 68 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors)) | 68 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors)) |
| 69 ignore_certificate_errors_ = true; | 69 ignore_certificate_errors_ = true; |
| 70 if (cmd_line->HasSwitch(switches::kContentShellDataPath)) { | 70 if (cmd_line->HasSwitch(switches::kContentShellDataPath)) { |
| 71 path_ = cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); | 71 path_ = cmd_line->GetSwitchValuePath(switches::kContentShellDataPath); |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 #if defined(OS_WIN) | 74 #if defined(OS_WIN) |
| 75 CHECK(PathService::Get(base::DIR_LOCAL_APP_DATA, &path_)); | 75 CHECK(PathService::Get(base::DIR_LOCAL_APP_DATA, &path_)); |
| 76 path_ = path_.Append(std::wstring(L"content_shell")); | 76 path_ = path_.Append(std::wstring(L"content_shell")); |
| 77 #elif defined(OS_LINUX) | 77 #elif defined(OS_LINUX) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { | 194 PushMessagingService* ShellBrowserContext::GetPushMessagingService() { |
| 195 return NULL; | 195 return NULL; |
| 196 } | 196 } |
| 197 | 197 |
| 198 SSLHostStateDelegate* ShellBrowserContext::GetSSLHostStateDelegate() { | 198 SSLHostStateDelegate* ShellBrowserContext::GetSSLHostStateDelegate() { |
| 199 return NULL; | 199 return NULL; |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace content | 202 } // namespace content |
| OLD | NEW |