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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 10916132: AppCache and StoragePartition'ing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/storage_partition_impl_map.cc
===================================================================
--- content/browser/storage_partition_impl_map.cc (revision 154786)
+++ content/browser/storage_partition_impl_map.cc (working copy)
@@ -24,15 +24,12 @@
}
StoragePartitionImplMap::~StoragePartitionImplMap() {
- STLDeleteContainerPairSecondPointers(partitions_.begin(),
- partitions_.end());
}
StoragePartitionImpl* StoragePartitionImplMap::Get(
const std::string& partition_id) {
// Find the previously created partition if it's available.
- std::map<std::string, StoragePartitionImpl*>::const_iterator it =
- partitions_.find(partition_id);
+ Map::const_iterator it = partitions_.find(partition_id);
if (it != partitions_.end())
return it->second;
@@ -63,10 +60,8 @@
void StoragePartitionImplMap::ForEach(
const BrowserContext::StoragePartitionCallback& callback) {
- for (std::map<std::string, StoragePartitionImpl*>::const_iterator it =
- partitions_.begin();
- it != partitions_.end();
- ++it) {
+ for (Map::const_iterator it = partitions_.begin();
+ it != partitions_.end(); ++it) {
callback.Run(it->first, it->second);
}
}
@@ -79,7 +74,8 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ChromeAppCacheService::InitializeOnIOThread,
- partition->GetAppCacheService(),
+ static_cast<ChromeAppCacheService*>(
awong 2012/09/06 22:29:27 If we keep the covariant return, we don't need thi
+ partition->GetAppCacheService()),
browser_context_->IsOffTheRecord() ? FilePath() :
partition_path.Append(kAppCacheDirname),
// TODO(michaeln): This is not right, appcache will be

Powered by Google App Engine
This is Rietveld 408576698