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/browser/storage_partition_impl.h" | 5 #include "content/browser/storage_partition_impl.h" |
6 | 6 |
7 #include "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/browser/browser_main_loop.h" | 9 #include "content/browser/browser_main_loop.h" |
10 #include "content/browser/fileapi/browser_file_system_helper.h" | 10 #include "content/browser/fileapi/browser_file_system_helper.h" |
11 #include "content/browser/gpu/shader_disk_cache.h" | 11 #include "content/browser/gpu/shader_disk_cache.h" |
12 #include "content/browser/net/cookie_store_map.h" | |
13 #include "content/common/dom_storage/dom_storage_types.h" | 12 #include "content/common/dom_storage/dom_storage_types.h" |
14 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
15 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/dom_storage_context.h" | 15 #include "content/public/browser/dom_storage_context.h" |
17 #include "content/public/browser/indexed_db_context.h" | 16 #include "content/public/browser/indexed_db_context.h" |
18 #include "content/public/browser/local_storage_usage_info.h" | 17 #include "content/public/browser/local_storage_usage_info.h" |
19 #include "content/public/browser/session_storage_usage_info.h" | 18 #include "content/public/browser/session_storage_usage_info.h" |
20 #include "content/public/common/url_constants.h" | |
21 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
22 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
23 #include "net/cookies/cookie_monster.h" | 21 #include "net/cookies/cookie_monster.h" |
24 #include "net/url_request/url_request_context.h" | 22 #include "net/url_request/url_request_context.h" |
25 #include "net/url_request/url_request_context_getter.h" | 23 #include "net/url_request/url_request_context_getter.h" |
26 #include "webkit/browser/database/database_tracker.h" | 24 #include "webkit/browser/database/database_tracker.h" |
27 #include "webkit/browser/quota/quota_manager.h" | 25 #include "webkit/browser/quota/quota_manager.h" |
28 | 26 |
29 namespace content { | 27 namespace content { |
30 | 28 |
31 namespace { | 29 namespace { |
32 | 30 |
33 int GenerateQuotaClientMask(uint32 remove_mask) { | 31 int GenerateQuotaClientMask(uint32 remove_mask) { |
34 int quota_client_mask = 0; | 32 int quota_client_mask = 0; |
35 | 33 |
36 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) | 34 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS) |
37 quota_client_mask |= quota::QuotaClient::kFileSystem; | 35 quota_client_mask |= quota::QuotaClient::kFileSystem; |
38 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) | 36 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_WEBSQL) |
39 quota_client_mask |= quota::QuotaClient::kDatabase; | 37 quota_client_mask |= quota::QuotaClient::kDatabase; |
40 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) | 38 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_APPCACHE) |
41 quota_client_mask |= quota::QuotaClient::kAppcache; | 39 quota_client_mask |= quota::QuotaClient::kAppcache; |
42 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_INDEXEDDB) | 40 if (remove_mask & StoragePartition::REMOVE_DATA_MASK_INDEXEDDB) |
43 quota_client_mask |= quota::QuotaClient::kIndexedDatabase; | 41 quota_client_mask |= quota::QuotaClient::kIndexedDatabase; |
44 | 42 |
45 return quota_client_mask; | 43 return quota_client_mask; |
46 } | 44 } |
47 | 45 |
| 46 void OnClearedCookies(const base::Closure& callback, int num_deleted) { |
| 47 // The final callback needs to happen from UI thread. |
| 48 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
| 49 BrowserThread::PostTask( |
| 50 BrowserThread::UI, FROM_HERE, |
| 51 base::Bind(&OnClearedCookies, callback, num_deleted)); |
| 52 return; |
| 53 } |
| 54 |
| 55 callback.Run(); |
| 56 } |
| 57 |
| 58 void ClearCookiesOnIOThread( |
| 59 const scoped_refptr<net::URLRequestContextGetter>& rq_context, |
| 60 const base::Time begin, |
| 61 const base::Time end, |
| 62 const GURL& remove_origin, |
| 63 const base::Closure& callback) { |
| 64 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 65 net::CookieStore* cookie_store = rq_context-> |
| 66 GetURLRequestContext()->cookie_store(); |
| 67 if (remove_origin.is_empty()) { |
| 68 cookie_store->GetCookieMonster()->DeleteAllCreatedBetweenAsync( |
| 69 begin, |
| 70 end, |
| 71 base::Bind(&OnClearedCookies, callback)); |
| 72 } else { |
| 73 cookie_store->GetCookieMonster()->DeleteAllCreatedBetweenForHostAsync( |
| 74 begin, |
| 75 end, |
| 76 remove_origin, base::Bind(&OnClearedCookies, callback)); |
| 77 } |
| 78 } |
| 79 |
48 void OnQuotaManagedOriginDeleted(const GURL& origin, | 80 void OnQuotaManagedOriginDeleted(const GURL& origin, |
49 quota::StorageType type, | 81 quota::StorageType type, |
50 size_t* origins_to_delete_count, | 82 size_t* origins_to_delete_count, |
51 const base::Closure& callback, | 83 const base::Closure& callback, |
52 quota::QuotaStatusCode status) { | 84 quota::QuotaStatusCode status) { |
53 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
54 DCHECK_GT(*origins_to_delete_count, 0u); | 86 DCHECK_GT(*origins_to_delete_count, 0u); |
55 if (status != quota::kQuotaStatusOk) { | 87 if (status != quota::kQuotaStatusOk) { |
56 DLOG(ERROR) << "Couldn't remove data of type " << type << " for origin " | 88 DLOG(ERROR) << "Couldn't remove data of type " << type << " for origin " |
57 << origin << ". Status: " << status; | 89 << origin << ". Status: " << status; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 : callback(callback), task_count(0) { | 241 : callback(callback), task_count(0) { |
210 } | 242 } |
211 | 243 |
212 void IncrementTaskCountOnUI(); | 244 void IncrementTaskCountOnUI(); |
213 void DecrementTaskCountOnUI(); | 245 void DecrementTaskCountOnUI(); |
214 | 246 |
215 void ClearDataOnUIThread(uint32 remove_mask, | 247 void ClearDataOnUIThread(uint32 remove_mask, |
216 uint32 quota_storage_remove_mask, | 248 uint32 quota_storage_remove_mask, |
217 const GURL& remove_origin, | 249 const GURL& remove_origin, |
218 const base::FilePath& path, | 250 const base::FilePath& path, |
219 CookieStoreMap* cookie_store_map, | 251 net::URLRequestContextGetter* rq_context, |
220 DOMStorageContextWrapper* dom_storage_context, | 252 DOMStorageContextWrapper* dom_storage_context, |
221 quota::QuotaManager* quota_manager, | 253 quota::QuotaManager* quota_manager, |
222 WebRTCIdentityStore* webrtc_identity_store, | 254 WebRTCIdentityStore* webrtc_identity_store, |
223 const base::Time begin, | 255 const base::Time begin, |
224 const base::Time end); | 256 const base::Time end); |
225 | 257 |
226 // Accessed on UI thread. | 258 // Accessed on UI thread. |
227 const base::Closure callback; | 259 const base::Closure callback; |
228 // Accessed on UI thread. | 260 // Accessed on UI thread. |
229 int task_count; | 261 int task_count; |
(...skipping 15 matching lines...) Expand all Loading... |
245 } | 277 } |
246 | 278 |
247 StoragePartitionImpl::StoragePartitionImpl( | 279 StoragePartitionImpl::StoragePartitionImpl( |
248 const base::FilePath& partition_path, | 280 const base::FilePath& partition_path, |
249 quota::QuotaManager* quota_manager, | 281 quota::QuotaManager* quota_manager, |
250 ChromeAppCacheService* appcache_service, | 282 ChromeAppCacheService* appcache_service, |
251 fileapi::FileSystemContext* filesystem_context, | 283 fileapi::FileSystemContext* filesystem_context, |
252 webkit_database::DatabaseTracker* database_tracker, | 284 webkit_database::DatabaseTracker* database_tracker, |
253 DOMStorageContextWrapper* dom_storage_context, | 285 DOMStorageContextWrapper* dom_storage_context, |
254 IndexedDBContextImpl* indexed_db_context, | 286 IndexedDBContextImpl* indexed_db_context, |
255 scoped_ptr<CookieStoreMap> cookie_store_map, | |
256 WebRTCIdentityStore* webrtc_identity_store) | 287 WebRTCIdentityStore* webrtc_identity_store) |
257 : partition_path_(partition_path), | 288 : partition_path_(partition_path), |
258 quota_manager_(quota_manager), | 289 quota_manager_(quota_manager), |
259 appcache_service_(appcache_service), | 290 appcache_service_(appcache_service), |
260 filesystem_context_(filesystem_context), | 291 filesystem_context_(filesystem_context), |
261 database_tracker_(database_tracker), | 292 database_tracker_(database_tracker), |
262 dom_storage_context_(dom_storage_context), | 293 dom_storage_context_(dom_storage_context), |
263 indexed_db_context_(indexed_db_context), | 294 indexed_db_context_(indexed_db_context), |
264 cookie_store_map_(cookie_store_map.Pass()), | 295 webrtc_identity_store_(webrtc_identity_store) {} |
265 webrtc_identity_store_(webrtc_identity_store) { | |
266 } | |
267 | 296 |
268 StoragePartitionImpl::~StoragePartitionImpl() { | 297 StoragePartitionImpl::~StoragePartitionImpl() { |
269 // These message loop checks are just to avoid leaks in unittests. | 298 // These message loop checks are just to avoid leaks in unittests. |
270 if (GetDatabaseTracker() && | 299 if (GetDatabaseTracker() && |
271 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { | 300 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { |
272 BrowserThread::PostTask( | 301 BrowserThread::PostTask( |
273 BrowserThread::FILE, FROM_HERE, | 302 BrowserThread::FILE, FROM_HERE, |
274 base::Bind(&webkit_database::DatabaseTracker::Shutdown, | 303 base::Bind(&webkit_database::DatabaseTracker::Shutdown, |
275 GetDatabaseTracker())); | 304 GetDatabaseTracker())); |
276 } | 305 } |
277 | 306 |
278 if (GetFileSystemContext()) | 307 if (GetFileSystemContext()) |
279 GetFileSystemContext()->Shutdown(); | 308 GetFileSystemContext()->Shutdown(); |
280 | 309 |
281 if (GetDOMStorageContext()) | 310 if (GetDOMStorageContext()) |
282 GetDOMStorageContext()->Shutdown(); | 311 GetDOMStorageContext()->Shutdown(); |
283 } | 312 } |
284 | 313 |
285 // TODO(ajwong): Break the direct dependency on |context|. We only | 314 // TODO(ajwong): Break the direct dependency on |context|. We only |
286 // need 3 pieces of info from it. | 315 // need 3 pieces of info from it. |
287 StoragePartitionImpl* StoragePartitionImpl::Create( | 316 StoragePartitionImpl* StoragePartitionImpl::Create( |
288 BrowserContext* context, | 317 BrowserContext* context, |
289 bool in_memory, | 318 bool in_memory, |
290 const base::FilePath& partition_path, | 319 const base::FilePath& partition_path) { |
291 scoped_ptr<CookieStoreMap> cookie_store_map) { | |
292 // Ensure that these methods are called on the UI thread, except for | 320 // Ensure that these methods are called on the UI thread, except for |
293 // unittests where a UI thread might not have been created. | 321 // unittests where a UI thread might not have been created. |
294 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || | 322 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || |
295 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); | 323 !BrowserThread::IsMessageLoopValid(BrowserThread::UI)); |
296 | 324 |
297 // All of the clients have to be created and registered with the | 325 // All of the clients have to be created and registered with the |
298 // QuotaManager prior to the QuotaManger being used. We do them | 326 // QuotaManager prior to the QuotaManger being used. We do them |
299 // all together here prior to handing out a reference to anything | 327 // all together here prior to handing out a reference to anything |
300 // that utilizes the QuotaManager. | 328 // that utilizes the QuotaManager. |
301 scoped_refptr<quota::QuotaManager> quota_manager = new quota::QuotaManager( | 329 scoped_refptr<quota::QuotaManager> quota_manager = new quota::QuotaManager( |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store( | 373 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store( |
346 new WebRTCIdentityStore(path, context->GetSpecialStoragePolicy())); | 374 new WebRTCIdentityStore(path, context->GetSpecialStoragePolicy())); |
347 | 375 |
348 return new StoragePartitionImpl(partition_path, | 376 return new StoragePartitionImpl(partition_path, |
349 quota_manager.get(), | 377 quota_manager.get(), |
350 appcache_service.get(), | 378 appcache_service.get(), |
351 filesystem_context.get(), | 379 filesystem_context.get(), |
352 database_tracker.get(), | 380 database_tracker.get(), |
353 dom_storage_context.get(), | 381 dom_storage_context.get(), |
354 indexed_db_context.get(), | 382 indexed_db_context.get(), |
355 cookie_store_map.Pass(), | |
356 webrtc_identity_store.get()); | 383 webrtc_identity_store.get()); |
357 } | 384 } |
358 | 385 |
359 base::FilePath StoragePartitionImpl::GetPath() { | 386 base::FilePath StoragePartitionImpl::GetPath() { |
360 return partition_path_; | 387 return partition_path_; |
361 } | 388 } |
362 | 389 |
363 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { | 390 net::URLRequestContextGetter* StoragePartitionImpl::GetURLRequestContext() { |
364 return url_request_context_.get(); | 391 return url_request_context_.get(); |
365 } | 392 } |
(...skipping 20 matching lines...) Expand all Loading... |
386 } | 413 } |
387 | 414 |
388 DOMStorageContextWrapper* StoragePartitionImpl::GetDOMStorageContext() { | 415 DOMStorageContextWrapper* StoragePartitionImpl::GetDOMStorageContext() { |
389 return dom_storage_context_.get(); | 416 return dom_storage_context_.get(); |
390 } | 417 } |
391 | 418 |
392 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { | 419 IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { |
393 return indexed_db_context_.get(); | 420 return indexed_db_context_.get(); |
394 } | 421 } |
395 | 422 |
396 net::CookieStore* StoragePartitionImpl::GetCookieStoreForScheme( | |
397 const std::string& scheme) { | |
398 return GetCookieStoreMap().GetForScheme(scheme); | |
399 } | |
400 | |
401 void StoragePartitionImpl::ClearDataImpl( | 423 void StoragePartitionImpl::ClearDataImpl( |
402 uint32 remove_mask, | 424 uint32 remove_mask, |
403 uint32 quota_storage_remove_mask, | 425 uint32 quota_storage_remove_mask, |
404 const GURL& remove_origin, | 426 const GURL& remove_origin, |
| 427 net::URLRequestContextGetter* rq_context, |
405 const base::Time begin, | 428 const base::Time begin, |
406 const base::Time end, | 429 const base::Time end, |
407 const base::Closure& callback) { | 430 const base::Closure& callback) { |
408 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 431 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
409 DataDeletionHelper* helper = new DataDeletionHelper(callback); | 432 DataDeletionHelper* helper = new DataDeletionHelper(callback); |
410 // |helper| deletes itself when done in | 433 // |helper| deletes itself when done in |
411 // DataDeletionHelper::DecrementTaskCountOnUI(). | 434 // DataDeletionHelper::DecrementTaskCountOnUI(). |
412 helper->ClearDataOnUIThread( | 435 helper->ClearDataOnUIThread( |
413 remove_mask, quota_storage_remove_mask, remove_origin, | 436 remove_mask, quota_storage_remove_mask, remove_origin, |
414 GetPath(), cookie_store_map_.get(), dom_storage_context_, quota_manager_, | 437 GetPath(), rq_context, dom_storage_context_, quota_manager_, |
415 webrtc_identity_store_, begin, end); | 438 webrtc_identity_store_, begin, end); |
416 } | 439 } |
417 | 440 |
418 void StoragePartitionImpl:: | 441 void StoragePartitionImpl:: |
419 QuotaManagedDataDeletionHelper::IncrementTaskCountOnIO() { | 442 QuotaManagedDataDeletionHelper::IncrementTaskCountOnIO() { |
420 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 443 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
421 ++task_count; | 444 ++task_count; |
422 } | 445 } |
423 | 446 |
424 void StoragePartitionImpl:: | 447 void StoragePartitionImpl:: |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 callback.Run(); | 540 callback.Run(); |
518 delete this; | 541 delete this; |
519 } | 542 } |
520 } | 543 } |
521 | 544 |
522 void StoragePartitionImpl::DataDeletionHelper::ClearDataOnUIThread( | 545 void StoragePartitionImpl::DataDeletionHelper::ClearDataOnUIThread( |
523 uint32 remove_mask, | 546 uint32 remove_mask, |
524 uint32 quota_storage_remove_mask, | 547 uint32 quota_storage_remove_mask, |
525 const GURL& remove_origin, | 548 const GURL& remove_origin, |
526 const base::FilePath& path, | 549 const base::FilePath& path, |
527 CookieStoreMap* cookie_store_map, | 550 net::URLRequestContextGetter* rq_context, |
528 DOMStorageContextWrapper* dom_storage_context, | 551 DOMStorageContextWrapper* dom_storage_context, |
529 quota::QuotaManager* quota_manager, | 552 quota::QuotaManager* quota_manager, |
530 WebRTCIdentityStore* webrtc_identity_store, | 553 WebRTCIdentityStore* webrtc_identity_store, |
531 const base::Time begin, | 554 const base::Time begin, |
532 const base::Time end) { | 555 const base::Time end) { |
533 DCHECK_NE(remove_mask, 0u); | 556 DCHECK_NE(remove_mask, 0u); |
534 DCHECK(!callback.is_null()); | 557 DCHECK(!callback.is_null()); |
535 | 558 |
536 IncrementTaskCountOnUI(); | 559 IncrementTaskCountOnUI(); |
537 base::Closure decrement_callback = base::Bind( | 560 base::Closure decrement_callback = base::Bind( |
538 &DataDeletionHelper::DecrementTaskCountOnUI, base::Unretained(this)); | 561 &DataDeletionHelper::DecrementTaskCountOnUI, base::Unretained(this)); |
539 | 562 |
540 if (remove_mask & REMOVE_DATA_MASK_COOKIES) { | 563 if (remove_mask & REMOVE_DATA_MASK_COOKIES) { |
541 // Handle the cookies. | 564 // Handle the cookies. |
542 IncrementTaskCountOnUI(); | 565 IncrementTaskCountOnUI(); |
543 cookie_store_map->DeleteCookies(remove_origin, begin, end, | 566 BrowserThread::PostTask( |
544 decrement_callback); | 567 BrowserThread::IO, FROM_HERE, |
| 568 base::Bind(&ClearCookiesOnIOThread, |
| 569 make_scoped_refptr(rq_context), begin, end, remove_origin, |
| 570 decrement_callback)); |
545 } | 571 } |
546 | 572 |
547 if (remove_mask & REMOVE_DATA_MASK_INDEXEDDB || | 573 if (remove_mask & REMOVE_DATA_MASK_INDEXEDDB || |
548 remove_mask & REMOVE_DATA_MASK_WEBSQL || | 574 remove_mask & REMOVE_DATA_MASK_WEBSQL || |
549 remove_mask & REMOVE_DATA_MASK_APPCACHE || | 575 remove_mask & REMOVE_DATA_MASK_APPCACHE || |
550 remove_mask & REMOVE_DATA_MASK_FILE_SYSTEMS) { | 576 remove_mask & REMOVE_DATA_MASK_FILE_SYSTEMS) { |
551 IncrementTaskCountOnUI(); | 577 IncrementTaskCountOnUI(); |
552 BrowserThread::PostTask( | 578 BrowserThread::PostTask( |
553 BrowserThread::IO, FROM_HERE, | 579 BrowserThread::IO, FROM_HERE, |
554 base::Bind(&ClearQuotaManagedDataOnIOThread, | 580 base::Bind(&ClearQuotaManagedDataOnIOThread, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 decrement_callback)); | 619 decrement_callback)); |
594 } | 620 } |
595 | 621 |
596 DecrementTaskCountOnUI(); | 622 DecrementTaskCountOnUI(); |
597 } | 623 } |
598 | 624 |
599 | 625 |
600 void StoragePartitionImpl::ClearDataForOrigin( | 626 void StoragePartitionImpl::ClearDataForOrigin( |
601 uint32 remove_mask, | 627 uint32 remove_mask, |
602 uint32 quota_storage_remove_mask, | 628 uint32 quota_storage_remove_mask, |
603 const GURL& storage_origin) { | 629 const GURL& storage_origin, |
| 630 net::URLRequestContextGetter* request_context_getter) { |
604 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 631 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
605 ClearDataImpl(remove_mask, quota_storage_remove_mask, storage_origin, | 632 ClearDataImpl(remove_mask, quota_storage_remove_mask, storage_origin, |
606 base::Time(), base::Time::Max(), base::Bind(&base::DoNothing)); | 633 request_context_getter, base::Time(), base::Time::Max(), |
| 634 base::Bind(&base::DoNothing)); |
607 } | 635 } |
608 | 636 |
609 void StoragePartitionImpl::ClearDataForUnboundedRange( | 637 void StoragePartitionImpl::ClearDataForUnboundedRange( |
610 uint32 remove_mask, | 638 uint32 remove_mask, |
611 uint32 quota_storage_remove_mask) { | 639 uint32 quota_storage_remove_mask) { |
612 ClearDataImpl(remove_mask, quota_storage_remove_mask, GURL(), | 640 ClearDataImpl(remove_mask, quota_storage_remove_mask, GURL(), |
613 base::Time(), base::Time::Max(), base::Bind(&base::DoNothing)); | 641 GetURLRequestContext(), base::Time(), base::Time::Max(), |
| 642 base::Bind(&base::DoNothing)); |
614 } | 643 } |
615 | 644 |
616 void StoragePartitionImpl::ClearDataForRange(uint32 remove_mask, | 645 void StoragePartitionImpl::ClearDataForRange(uint32 remove_mask, |
617 uint32 quota_storage_remove_mask, | 646 uint32 quota_storage_remove_mask, |
618 const base::Time& begin, | 647 const base::Time& begin, |
619 const base::Time& end, | 648 const base::Time& end, |
620 const base::Closure& callback) { | 649 const base::Closure& callback) { |
621 ClearDataImpl(remove_mask, quota_storage_remove_mask, GURL(), begin, end, | 650 ClearDataImpl(remove_mask, quota_storage_remove_mask, GURL(), |
622 callback); | 651 GetURLRequestContext(), begin, end, callback); |
623 } | 652 } |
624 | 653 |
625 WebRTCIdentityStore* StoragePartitionImpl::GetWebRTCIdentityStore() { | 654 WebRTCIdentityStore* StoragePartitionImpl::GetWebRTCIdentityStore() { |
626 return webrtc_identity_store_.get(); | 655 return webrtc_identity_store_.get(); |
627 } | 656 } |
628 | 657 |
629 const CookieStoreMap& StoragePartitionImpl::GetCookieStoreMap() { | |
630 return *cookie_store_map_; | |
631 } | |
632 | |
633 void StoragePartitionImpl::SetURLRequestContext( | 658 void StoragePartitionImpl::SetURLRequestContext( |
634 net::URLRequestContextGetter* url_request_context) { | 659 net::URLRequestContextGetter* url_request_context) { |
635 url_request_context_ = url_request_context; | 660 url_request_context_ = url_request_context; |
636 } | 661 } |
637 | 662 |
638 void StoragePartitionImpl::SetMediaURLRequestContext( | 663 void StoragePartitionImpl::SetMediaURLRequestContext( |
639 net::URLRequestContextGetter* media_url_request_context) { | 664 net::URLRequestContextGetter* media_url_request_context) { |
640 media_url_request_context_ = media_url_request_context; | 665 media_url_request_context_ = media_url_request_context; |
641 } | 666 } |
642 | 667 |
643 } // namespace content | 668 } // namespace content |
OLD | NEW |