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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: Omnibox hook Created 3 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/sequenced_task_runner.h" 15 #include "base/sequenced_task_runner.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/task_scheduler/post_task.h" 18 #include "base/task_scheduler/post_task.h"
19 #include "content/browser/blob_storage/chrome_blob_storage_context.h" 19 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
20 #include "content/browser/browser_main_loop.h" 20 #include "content/browser/browser_main_loop.h"
21 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove r.h" 21 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove r.h"
22 #include "content/browser/fileapi/browser_file_system_helper.h" 22 #include "content/browser/fileapi/browser_file_system_helper.h"
23 #include "content/browser/gpu/shader_cache_factory.h" 23 #include "content/browser/gpu/shader_cache_factory.h"
24 #include "content/browser/notifications/platform_notification_context_impl.h" 24 #include "content/browser/notifications/platform_notification_context_impl.h"
25 #include "content/browser/renderer_host/render_process_host_impl.h"
25 #include "content/common/dom_storage/dom_storage_types.h" 26 #include "content/common/dom_storage/dom_storage_types.h"
26 #include "content/public/browser/browser_context.h" 27 #include "content/public/browser/browser_context.h"
27 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/content_browser_client.h" 29 #include "content/public/browser/content_browser_client.h"
29 #include "content/public/browser/dom_storage_context.h" 30 #include "content/public/browser/dom_storage_context.h"
30 #include "content/public/browser/indexed_db_context.h" 31 #include "content/public/browser/indexed_db_context.h"
31 #include "content/public/browser/local_storage_usage_info.h" 32 #include "content/public/browser/local_storage_usage_info.h"
32 #include "content/public/browser/session_storage_usage_info.h" 33 #include "content/public/browser/session_storage_usage_info.h"
33 #include "content/public/common/content_client.h" 34 #include "content/public/common/content_client.h"
34 #include "content/public/common/content_switches.h" 35 #include "content/public/common/content_switches.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 395
395 // These message loop checks are just to avoid leaks in unittests. 396 // These message loop checks are just to avoid leaks in unittests.
396 if (GetDatabaseTracker() && 397 if (GetDatabaseTracker() &&
397 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { 398 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) {
398 BrowserThread::PostTask( 399 BrowserThread::PostTask(
399 BrowserThread::FILE, 400 BrowserThread::FILE,
400 FROM_HERE, 401 FROM_HERE,
401 base::Bind(&storage::DatabaseTracker::Shutdown, GetDatabaseTracker())); 402 base::Bind(&storage::DatabaseTracker::Shutdown, GetDatabaseTracker()));
402 } 403 }
403 404
405 RenderProcessHostImpl::OnStoragePartitionShutdown(this);
Charlie Reis 2017/06/25 23:48:28 Hmm. This feels a bit like a layering violation /
mattcary 2017/06/26 14:45:07 Not that I know of. The idea here is that if the p
Charlie Reis 2017/06/26 21:22:50 If the profile is deleted while it still has RPHs,
mattcary 2017/06/28 13:14:38 As far as I can tell, deleting a browser context w
Charlie Reis 2017/06/28 22:31:35 That's interesting about BrowserContext::NotifyWil
mattcary 2017/06/29 12:57:09 Actually, it's already done for us: NotifyWillBeDe
Charlie Reis 2017/06/29 21:09:16 Oh, that's pretty indirect! I'd worry about that
mattcary 2017/06/30 14:29:46 Added the comment of (2) and (3).
406
404 if (GetFileSystemContext()) 407 if (GetFileSystemContext())
405 GetFileSystemContext()->Shutdown(); 408 GetFileSystemContext()->Shutdown();
406 409
407 if (GetDOMStorageContext()) 410 if (GetDOMStorageContext())
408 GetDOMStorageContext()->Shutdown(); 411 GetDOMStorageContext()->Shutdown();
409 412
410 if (GetServiceWorkerContext()) 413 if (GetServiceWorkerContext())
411 GetServiceWorkerContext()->Shutdown(); 414 GetServiceWorkerContext()->Shutdown();
412 415
413 if (GetCacheStorageContext()) 416 if (GetCacheStorageContext())
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 media_url_request_context_ = media_url_request_context; 989 media_url_request_context_ = media_url_request_context;
987 } 990 }
988 991
989 void StoragePartitionImpl::GetQuotaSettings( 992 void StoragePartitionImpl::GetQuotaSettings(
990 const storage::OptionalQuotaSettingsCallback& callback) { 993 const storage::OptionalQuotaSettingsCallback& callback) {
991 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, 994 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this,
992 callback); 995 callback);
993 } 996 }
994 997
995 } // namespace content 998 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698