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

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

Issue 1844843004: Set the data path of StoragePartition correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 context, partition_path, in_memory, quota_manager->proxy()); 436 context, partition_path, in_memory, quota_manager->proxy());
437 437
438 scoped_refptr<storage::DatabaseTracker> database_tracker = 438 scoped_refptr<storage::DatabaseTracker> database_tracker =
439 new storage::DatabaseTracker(partition_path, 439 new storage::DatabaseTracker(partition_path,
440 in_memory, 440 in_memory,
441 context->GetSpecialStoragePolicy(), 441 context->GetSpecialStoragePolicy(),
442 quota_manager->proxy(), 442 quota_manager->proxy(),
443 BrowserThread::GetMessageLoopProxyForThread( 443 BrowserThread::GetMessageLoopProxyForThread(
444 BrowserThread::FILE).get()); 444 BrowserThread::FILE).get());
445 445
446 base::FilePath path = in_memory ? base::FilePath() : context->GetPath();
447 scoped_refptr<DOMStorageContextWrapper> dom_storage_context = 446 scoped_refptr<DOMStorageContextWrapper> dom_storage_context =
448 new DOMStorageContextWrapper(BrowserContext::GetMojoUserIdFor(context), 447 new DOMStorageContextWrapper(
449 path, relative_partition_path, 448 BrowserContext::GetMojoUserIdFor(context),
450 context->GetSpecialStoragePolicy()); 449 in_memory ? base::FilePath() : context->GetPath(),
450 relative_partition_path, context->GetSpecialStoragePolicy());
451 451
452 // BrowserMainLoop may not be initialized in unit tests. Tests will 452 // BrowserMainLoop may not be initialized in unit tests. Tests will
453 // need to inject their own task runner into the IndexedDBContext. 453 // need to inject their own task runner into the IndexedDBContext.
454 base::SequencedTaskRunner* idb_task_runner = 454 base::SequencedTaskRunner* idb_task_runner =
455 BrowserThread::CurrentlyOn(BrowserThread::UI) && 455 BrowserThread::CurrentlyOn(BrowserThread::UI) &&
456 BrowserMainLoop::GetInstance() 456 BrowserMainLoop::GetInstance()
457 ? BrowserMainLoop::GetInstance() 457 ? BrowserMainLoop::GetInstance()
458 ->indexed_db_thread() 458 ->indexed_db_thread()
459 ->task_runner() 459 ->task_runner()
460 .get() 460 .get()
461 : NULL; 461 : NULL;
462
463 base::FilePath path = in_memory ? base::FilePath() : partition_path;
462 scoped_refptr<IndexedDBContextImpl> indexed_db_context = 464 scoped_refptr<IndexedDBContextImpl> indexed_db_context =
463 new IndexedDBContextImpl(path, 465 new IndexedDBContextImpl(path,
464 context->GetSpecialStoragePolicy(), 466 context->GetSpecialStoragePolicy(),
465 quota_manager->proxy(), 467 quota_manager->proxy(),
466 idb_task_runner); 468 idb_task_runner);
467 469
468 scoped_refptr<CacheStorageContextImpl> cache_storage_context = 470 scoped_refptr<CacheStorageContextImpl> cache_storage_context =
469 new CacheStorageContextImpl(context); 471 new CacheStorageContextImpl(context);
470 cache_storage_context->Init(path, make_scoped_refptr(quota_manager->proxy())); 472 cache_storage_context->Init(path, make_scoped_refptr(quota_manager->proxy()));
471 473
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 net::URLRequestContextGetter* url_request_context) { 911 net::URLRequestContextGetter* url_request_context) {
910 url_request_context_ = url_request_context; 912 url_request_context_ = url_request_context;
911 } 913 }
912 914
913 void StoragePartitionImpl::SetMediaURLRequestContext( 915 void StoragePartitionImpl::SetMediaURLRequestContext(
914 net::URLRequestContextGetter* media_url_request_context) { 916 net::URLRequestContextGetter* media_url_request_context) {
915 media_url_request_context_ = media_url_request_context; 917 media_url_request_context_ = media_url_request_context;
916 } 918 }
917 919
918 } // namespace content 920 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698