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