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

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

Issue 1737933002: mojo leveldb: Get profile and leveldb connected to DOMStorageContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. (Mostly removing BrowserContext knowlege.) Created 4 years, 9 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 scoped_refptr<storage::DatabaseTracker> database_tracker = 435 scoped_refptr<storage::DatabaseTracker> database_tracker =
436 new storage::DatabaseTracker(partition_path, 436 new storage::DatabaseTracker(partition_path,
437 in_memory, 437 in_memory,
438 context->GetSpecialStoragePolicy(), 438 context->GetSpecialStoragePolicy(),
439 quota_manager->proxy(), 439 quota_manager->proxy(),
440 BrowserThread::GetMessageLoopProxyForThread( 440 BrowserThread::GetMessageLoopProxyForThread(
441 BrowserThread::FILE).get()); 441 BrowserThread::FILE).get());
442 442
443 base::FilePath path = in_memory ? base::FilePath() : partition_path; 443 base::FilePath path = in_memory ? base::FilePath() : partition_path;
444 scoped_refptr<DOMStorageContextWrapper> dom_storage_context = 444 scoped_refptr<DOMStorageContextWrapper> dom_storage_context =
445 new DOMStorageContextWrapper(path, context->GetSpecialStoragePolicy()); 445 new DOMStorageContextWrapper(
446 BrowserContext::GetMojoUserIdFor(context),
447 path,
448 context->GetSpecialStoragePolicy());
446 449
447 // BrowserMainLoop may not be initialized in unit tests. Tests will 450 // BrowserMainLoop may not be initialized in unit tests. Tests will
448 // need to inject their own task runner into the IndexedDBContext. 451 // need to inject their own task runner into the IndexedDBContext.
449 base::SequencedTaskRunner* idb_task_runner = 452 base::SequencedTaskRunner* idb_task_runner =
450 BrowserThread::CurrentlyOn(BrowserThread::UI) && 453 BrowserThread::CurrentlyOn(BrowserThread::UI) &&
451 BrowserMainLoop::GetInstance() 454 BrowserMainLoop::GetInstance()
452 ? BrowserMainLoop::GetInstance() 455 ? BrowserMainLoop::GetInstance()
453 ->indexed_db_thread() 456 ->indexed_db_thread()
454 ->task_runner() 457 ->task_runner()
455 .get() 458 .get()
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 net::URLRequestContextGetter* url_request_context) { 919 net::URLRequestContextGetter* url_request_context) {
917 url_request_context_ = url_request_context; 920 url_request_context_ = url_request_context;
918 } 921 }
919 922
920 void StoragePartitionImpl::SetMediaURLRequestContext( 923 void StoragePartitionImpl::SetMediaURLRequestContext(
921 net::URLRequestContextGetter* media_url_request_context) { 924 net::URLRequestContextGetter* media_url_request_context) {
922 media_url_request_context_ = media_url_request_context; 925 media_url_request_context_ = media_url_request_context;
923 } 926 }
924 927
925 } // namespace content 928 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698