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

Side by Side Diff: content/browser/storage_partition_impl_map.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: ben comments 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_map.h" 5 #include "content/browser/storage_partition_impl_map.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const std::string& partition_name, 389 const std::string& partition_name,
390 bool in_memory) { 390 bool in_memory) {
391 // Find the previously created partition if it's available. 391 // Find the previously created partition if it's available.
392 StoragePartitionConfig partition_config( 392 StoragePartitionConfig partition_config(
393 partition_domain, partition_name, in_memory); 393 partition_domain, partition_name, in_memory);
394 394
395 PartitionMap::const_iterator it = partitions_.find(partition_config); 395 PartitionMap::const_iterator it = partitions_.find(partition_config);
396 if (it != partitions_.end()) 396 if (it != partitions_.end())
397 return it->second; 397 return it->second;
398 398
399 base::FilePath local_partition_path =
400 GetStoragePartitionPath(partition_domain, partition_name);
399 base::FilePath partition_path = 401 base::FilePath partition_path =
400 browser_context_->GetPath().Append( 402 browser_context_->GetPath().Append(local_partition_path);
401 GetStoragePartitionPath(partition_domain, partition_name)); 403
402 StoragePartitionImpl* partition = 404 StoragePartitionImpl* partition =
403 StoragePartitionImpl::Create(browser_context_, in_memory, 405 StoragePartitionImpl::Create(browser_context_, in_memory,
404 partition_path); 406 partition_path,
407 local_partition_path);
405 partitions_[partition_config] = partition; 408 partitions_[partition_config] = partition;
406 409
407 partition->GetQuotaManager()->SetTemporaryStorageEvictionPolicy( 410 partition->GetQuotaManager()->SetTemporaryStorageEvictionPolicy(
408 GetContentClient()->browser()->GetTemporaryStorageEvictionPolicy( 411 GetContentClient()->browser()->GetTemporaryStorageEvictionPolicy(
409 browser_context_)); 412 browser_context_));
410 413
411 ChromeBlobStorageContext* blob_storage_context = 414 ChromeBlobStorageContext* blob_storage_context =
412 ChromeBlobStorageContext::GetFor(browser_context_); 415 ChromeBlobStorageContext::GetFor(browser_context_);
413 StreamContext* stream_context = StreamContext::GetFor(browser_context_); 416 StreamContext* stream_context = StreamContext::GetFor(browser_context_);
414 ProtocolHandlerMap protocol_handlers; 417 ProtocolHandlerMap protocol_handlers;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 619
617 // We do not call InitializeURLRequestContext() for media contexts because, 620 // We do not call InitializeURLRequestContext() for media contexts because,
618 // other than the HTTP cache, the media contexts share the same backing 621 // other than the HTTP cache, the media contexts share the same backing
619 // objects as their associated "normal" request context. Thus, the previous 622 // objects as their associated "normal" request context. Thus, the previous
620 // call serves to initialize the media request context for this storage 623 // call serves to initialize the media request context for this storage
621 // partition as well. 624 // partition as well.
622 } 625 }
623 } 626 }
624 627
625 } // namespace content 628 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698