OLD | NEW |
---|---|
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/public/browser/browser_context.h" | 5 #include "content/public/browser/browser_context.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <limits> | 10 #include <limits> |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
479 if (!connection_holder) | 479 if (!connection_holder) |
480 return nullptr; | 480 return nullptr; |
481 return connection_holder->shell_connection()->GetConnector(); | 481 return connection_holder->shell_connection()->GetConnector(); |
482 } | 482 } |
483 | 483 |
484 BrowserContext::~BrowserContext() { | 484 BrowserContext::~BrowserContext() { |
485 CHECK(GetUserData(kMojoWasInitialized)) | 485 CHECK(GetUserData(kMojoWasInitialized)) |
486 << "Attempting to destroy a BrowserContext that never called " | 486 << "Attempting to destroy a BrowserContext that never called " |
487 << "Initialize()"; | 487 << "Initialize()"; |
488 | 488 |
489 DCHECK(!GetUserData(kStoragePartitionMapKeyName)) | |
490 << "StoragePartitionMap is not shut down properly"; | |
491 | |
489 RemoveBrowserContextFromUserIdMap(this); | 492 RemoveBrowserContextFromUserIdMap(this); |
490 | 493 |
491 if (GetUserData(kDownloadManagerKeyName)) | 494 if (GetUserData(kDownloadManagerKeyName)) |
492 GetDownloadManager(this)->Shutdown(); | 495 GetDownloadManager(this)->Shutdown(); |
493 } | 496 } |
494 | 497 |
498 void BrowserContext::ShutdownStoragePartitions() { | |
499 if (GetUserData(kStoragePartitionMapKeyName)) | |
500 RemoveUserData(kStoragePartitionMapKeyName); | |
mmenke
2016/07/19 17:55:20
Storage partitions are stored as user data attache
kinuko
2016/07/21 03:06:25
I suppose we wanted to avoid exposing internal stu
mmenke
2016/07/21 15:27:20
I didn't mean to suggest you make that part of thi
| |
501 } | |
502 | |
495 } // namespace content | 503 } // namespace content |
OLD | NEW |