| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/shell/browser/cast_browser_context.h" | 5 #include "chromecast/shell/browser/cast_browser_context.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chromecast/common/cast_paths.h" | 10 #include "chromecast/common/cast_paths.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 CastBrowserContext::CastBrowserContext( | 47 CastBrowserContext::CastBrowserContext( |
| 48 URLRequestContextFactory* url_request_context_factory) | 48 URLRequestContextFactory* url_request_context_factory) |
| 49 : url_request_context_factory_(url_request_context_factory), | 49 : url_request_context_factory_(url_request_context_factory), |
| 50 resource_context_(new CastResourceContext(url_request_context_factory)) { | 50 resource_context_(new CastResourceContext(url_request_context_factory)) { |
| 51 InitWhileIOAllowed(); | 51 InitWhileIOAllowed(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 CastBrowserContext::~CastBrowserContext() { | 54 CastBrowserContext::~CastBrowserContext() { |
| 55 content::BrowserThread::DeleteSoon( |
| 56 content::BrowserThread::IO, |
| 57 FROM_HERE, |
| 58 resource_context_.release()); |
| 55 } | 59 } |
| 56 | 60 |
| 57 void CastBrowserContext::InitWhileIOAllowed() { | 61 void CastBrowserContext::InitWhileIOAllowed() { |
| 58 // Chromecast doesn't support user profiles nor does it have | 62 // Chromecast doesn't support user profiles nor does it have |
| 59 // incognito mode. This means that all of the persistent | 63 // incognito mode. This means that all of the persistent |
| 60 // data (currently only cookies and local storage) will be | 64 // data (currently only cookies and local storage) will be |
| 61 // shared in a single location as defined here. | 65 // shared in a single location as defined here. |
| 62 CHECK(PathService::Get(DIR_CAST_HOME, &path_)); | 66 CHECK(PathService::Get(DIR_CAST_HOME, &path_)); |
| 63 } | 67 } |
| 64 | 68 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return NULL; | 124 return NULL; |
| 121 } | 125 } |
| 122 | 126 |
| 123 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() { | 127 content::SSLHostStateDelegate* CastBrowserContext::GetSSLHostStateDelegate() { |
| 124 NOTIMPLEMENTED(); | 128 NOTIMPLEMENTED(); |
| 125 return NULL; | 129 return NULL; |
| 126 } | 130 } |
| 127 | 131 |
| 128 } // namespace shell | 132 } // namespace shell |
| 129 } // namespace chromecast | 133 } // namespace chromecast |
| OLD | NEW |