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

Side by Side Diff: blimp/engine/common/blimp_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 | « no previous file | chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/common/blimp_browser_context.h" 5 #include "blimp/engine/common/blimp_browser_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 off_the_record_(off_the_record), 73 off_the_record_(off_the_record),
74 net_log_(net_log) { 74 net_log_(net_log) {
75 InitWhileIOAllowed(); 75 InitWhileIOAllowed();
76 InitPrefService(); 76 InitPrefService();
77 metrics_service_client_.reset( 77 metrics_service_client_.reset(
78 new BlimpMetricsServiceClient(pref_service_.get(), 78 new BlimpMetricsServiceClient(pref_service_.get(),
79 GetSystemRequestContextGetter())); 79 GetSystemRequestContextGetter()));
80 } 80 }
81 81
82 BlimpBrowserContext::~BlimpBrowserContext() { 82 BlimpBrowserContext::~BlimpBrowserContext() {
83 ShutdownStoragePartitions();
83 if (resource_context_) { 84 if (resource_context_) {
84 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, 85 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
85 resource_context_.release()); 86 resource_context_.release());
86 } 87 }
87 } 88 }
88 89
89 void BlimpBrowserContext::InitWhileIOAllowed() { 90 void BlimpBrowserContext::InitWhileIOAllowed() {
90 // Ensures ~/.config/blimp_engine directory exists. 91 // Ensures ~/.config/blimp_engine directory exists.
91 std::unique_ptr<base::Environment> env(base::Environment::Create()); 92 std::unique_ptr<base::Environment> env(base::Environment::Create());
92 base::FilePath config_dir(base::nix::GetXDGDirectory( 93 base::FilePath config_dir(base::nix::GetXDGDirectory(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 205
205 net::URLRequestContextGetter* 206 net::URLRequestContextGetter*
206 BlimpBrowserContext::CreateMediaRequestContextForStoragePartition( 207 BlimpBrowserContext::CreateMediaRequestContextForStoragePartition(
207 const base::FilePath& partition_path, 208 const base::FilePath& partition_path,
208 bool in_memory) { 209 bool in_memory) {
209 return nullptr; 210 return nullptr;
210 } 211 }
211 212
212 } // namespace engine 213 } // namespace engine
213 } // namespace blimp 214 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698