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 #if !defined(OS_IOS) | 7 #if !defined(OS_IOS) |
8 #include "content/browser/appcache/chrome_appcache_service.h" | 8 #include "content/browser/appcache/chrome_appcache_service.h" |
9 #include "webkit/database/database_tracker.h" | 9 #include "webkit/database/database_tracker.h" |
10 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 10 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 StoragePartition* BrowserContext::GetStoragePartition( | 110 StoragePartition* BrowserContext::GetStoragePartition( |
111 BrowserContext* browser_context, | 111 BrowserContext* browser_context, |
112 SiteInstance* site_instance) { | 112 SiteInstance* site_instance) { |
113 std::string partition_id; // Default to "" for NULL |site_instance|. | 113 std::string partition_id; // Default to "" for NULL |site_instance|. |
114 | 114 |
115 // TODO(ajwong): After GetDefaultStoragePartition() is removed, get rid of | 115 // TODO(ajwong): After GetDefaultStoragePartition() is removed, get rid of |
116 // this conditional and require that |site_instance| is non-NULL. | 116 // this conditional and require that |site_instance| is non-NULL. |
117 if (site_instance) { | 117 if (site_instance) { |
118 partition_id = GetContentClient()->browser()-> | 118 partition_id = GetContentClient()->browser()-> |
119 GetStoragePartitionIdForSite(browser_context, site_instance->GetSite()); | 119 GetStoragePartitionIdForSite(browser_context, |
| 120 site_instance->GetSiteURL()); |
120 } | 121 } |
121 | 122 |
122 return GetStoragePartitionByPartitionId(browser_context, partition_id); | 123 return GetStoragePartitionByPartitionId(browser_context, partition_id); |
123 } | 124 } |
124 | 125 |
125 StoragePartition* BrowserContext::GetStoragePartitionForSite( | 126 StoragePartition* BrowserContext::GetStoragePartitionForSite( |
126 BrowserContext* browser_context, | 127 BrowserContext* browser_context, |
127 const GURL& site) { | 128 const GURL& site) { |
128 std::string partition_id = GetContentClient()->browser()-> | 129 std::string partition_id = GetContentClient()->browser()-> |
129 GetStoragePartitionIdForSite(browser_context, site); | 130 GetStoragePartitionIdForSite(browser_context, site); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 #endif // !OS_IOS | 207 #endif // !OS_IOS |
207 | 208 |
208 BrowserContext::~BrowserContext() { | 209 BrowserContext::~BrowserContext() { |
209 #if !defined(OS_IOS) | 210 #if !defined(OS_IOS) |
210 if (GetUserData(kDownloadManagerKeyName)) | 211 if (GetUserData(kDownloadManagerKeyName)) |
211 GetDownloadManager(this)->Shutdown(); | 212 GetDownloadManager(this)->Shutdown(); |
212 #endif | 213 #endif |
213 } | 214 } |
214 | 215 |
215 } // namespace content | 216 } // namespace content |
OLD | NEW |