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

Side by Side Diff: content/shell/browser/shell_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
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 net::NetLog* net_log) 56 net::NetLog* net_log)
57 : resource_context_(new ShellResourceContext), 57 : resource_context_(new ShellResourceContext),
58 ignore_certificate_errors_(false), 58 ignore_certificate_errors_(false),
59 off_the_record_(off_the_record), 59 off_the_record_(off_the_record),
60 net_log_(net_log), 60 net_log_(net_log),
61 guest_manager_(NULL) { 61 guest_manager_(NULL) {
62 InitWhileIOAllowed(); 62 InitWhileIOAllowed();
63 } 63 }
64 64
65 ShellBrowserContext::~ShellBrowserContext() { 65 ShellBrowserContext::~ShellBrowserContext() {
66 ShutdownStoragePartitions();
66 if (resource_context_) { 67 if (resource_context_) {
67 BrowserThread::DeleteSoon( 68 BrowserThread::DeleteSoon(
68 BrowserThread::IO, FROM_HERE, resource_context_.release()); 69 BrowserThread::IO, FROM_HERE, resource_context_.release());
69 } 70 }
70 } 71 }
71 72
72 void ShellBrowserContext::InitWhileIOAllowed() { 73 void ShellBrowserContext::InitWhileIOAllowed() {
73 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 74 base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
74 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors)) 75 if (cmd_line->HasSwitch(switches::kIgnoreCertificateErrors))
75 ignore_certificate_errors_ = true; 76 ignore_certificate_errors_ = true;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return permission_manager_.get(); 196 return permission_manager_.get();
196 } 197 }
197 198
198 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() { 199 BackgroundSyncController* ShellBrowserContext::GetBackgroundSyncController() {
199 if (!background_sync_controller_) 200 if (!background_sync_controller_)
200 background_sync_controller_.reset(new MockBackgroundSyncController()); 201 background_sync_controller_.reset(new MockBackgroundSyncController());
201 return background_sync_controller_.get(); 202 return background_sync_controller_.get();
202 } 203 }
203 204
204 } // namespace content 205 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_browser_context.cc ('k') | headless/lib/browser/headless_browser_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698