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

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

Issue 1363523003: Enable SiteEngagementEvictionPolicy behind --enable-site-eviction-policy flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lru_policy_gooood
Patch Set: fix flag dependencies Created 5 years, 1 month 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 return it->second; 390 return it->second;
391 391
392 base::FilePath partition_path = 392 base::FilePath partition_path =
393 browser_context_->GetPath().Append( 393 browser_context_->GetPath().Append(
394 GetStoragePartitionPath(partition_domain, partition_name)); 394 GetStoragePartitionPath(partition_domain, partition_name));
395 StoragePartitionImpl* partition = 395 StoragePartitionImpl* partition =
396 StoragePartitionImpl::Create(browser_context_, in_memory, 396 StoragePartitionImpl::Create(browser_context_, in_memory,
397 partition_path); 397 partition_path);
398 partitions_[partition_config] = partition; 398 partitions_[partition_config] = partition;
399 399
400 partition->GetQuotaManager()->SetTemporaryStorageEvictionPolicy(
401 GetContentClient()->browser()->GetTemporaryStorageEvictionPolicy(
402 browser_context_));
403
400 ChromeBlobStorageContext* blob_storage_context = 404 ChromeBlobStorageContext* blob_storage_context =
401 ChromeBlobStorageContext::GetFor(browser_context_); 405 ChromeBlobStorageContext::GetFor(browser_context_);
402 StreamContext* stream_context = StreamContext::GetFor(browser_context_); 406 StreamContext* stream_context = StreamContext::GetFor(browser_context_);
403 ProtocolHandlerMap protocol_handlers; 407 ProtocolHandlerMap protocol_handlers;
404 protocol_handlers[url::kBlobScheme] = 408 protocol_handlers[url::kBlobScheme] =
405 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( 409 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
406 new BlobProtocolHandler(blob_storage_context, 410 new BlobProtocolHandler(blob_storage_context,
407 stream_context, 411 stream_context,
408 partition->GetFileSystemContext())); 412 partition->GetFileSystemContext()));
409 protocol_handlers[url::kFileSystemScheme] = 413 protocol_handlers[url::kFileSystemScheme] =
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 607
604 // We do not call InitializeURLRequestContext() for media contexts because, 608 // We do not call InitializeURLRequestContext() for media contexts because,
605 // other than the HTTP cache, the media contexts share the same backing 609 // other than the HTTP cache, the media contexts share the same backing
606 // objects as their associated "normal" request context. Thus, the previous 610 // objects as their associated "normal" request context. Thus, the previous
607 // call serves to initialize the media request context for this storage 611 // call serves to initialize the media request context for this storage
608 // partition as well. 612 // partition as well.
609 } 613 }
610 } 614 }
611 615
612 } // namespace content 616 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698