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

Side by Side Diff: chromecast/browser/cast_browser_context.cc

Issue 2159133002: Shutdown StoragePartition before ProfileIOData is being shut down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 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
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/browser/cast_browser_context.h" 5 #include "chromecast/browser/cast_browser_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 CastBrowserContext::CastBrowserContext( 51 CastBrowserContext::CastBrowserContext(
52 URLRequestContextFactory* url_request_context_factory) 52 URLRequestContextFactory* url_request_context_factory)
53 : url_request_context_factory_(url_request_context_factory), 53 : url_request_context_factory_(url_request_context_factory),
54 resource_context_(new CastResourceContext(url_request_context_factory)), 54 resource_context_(new CastResourceContext(url_request_context_factory)),
55 download_manager_delegate_(new CastDownloadManagerDelegate()) { 55 download_manager_delegate_(new CastDownloadManagerDelegate()) {
56 InitWhileIOAllowed(); 56 InitWhileIOAllowed();
57 } 57 }
58 58
59 CastBrowserContext::~CastBrowserContext() { 59 CastBrowserContext::~CastBrowserContext() {
60 ShutdownStoragePartitions();
60 content::BrowserThread::DeleteSoon( 61 content::BrowserThread::DeleteSoon(
61 content::BrowserThread::IO, 62 content::BrowserThread::IO,
62 FROM_HERE, 63 FROM_HERE,
63 resource_context_.release()); 64 resource_context_.release());
64 } 65 }
65 66
66 void CastBrowserContext::InitWhileIOAllowed() { 67 void CastBrowserContext::InitWhileIOAllowed() {
67 #if defined(OS_ANDROID) 68 #if defined(OS_ANDROID)
68 CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path_)); 69 CHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &path_));
69 path_ = path_.Append(FILE_PATH_LITERAL("cast_shell")); 70 path_ = path_.Append(FILE_PATH_LITERAL("cast_shell"));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 156 }
156 157
157 net::URLRequestContextGetter* 158 net::URLRequestContextGetter*
158 CastBrowserContext::CreateMediaRequestContextForStoragePartition( 159 CastBrowserContext::CreateMediaRequestContextForStoragePartition(
159 const base::FilePath& partition_path, bool in_memory) { 160 const base::FilePath& partition_path, bool in_memory) {
160 return nullptr; 161 return nullptr;
161 } 162 }
162 163
163 } // namespace shell 164 } // namespace shell
164 } // namespace chromecast 165 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698