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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.h

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Fix Mac compile. Created 5 years, 6 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: chrome/browser/predictors/resource_prefetch_predictor.h
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index d6a0053cec9678b6140d10ee5693ba6d1fb7f36f..a6d162ab5ca7e6394b2bc4bcb17ead81ce82a5d4 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/containers/scoped_ptr_map.h"
#include "base/gtest_prod_util.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
@@ -169,7 +170,7 @@ class ResourcePrefetchPredictor
typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap;
typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > >
NavigationMap;
- typedef std::map<NavigationID, Result*> ResultsMap;
+ typedef ScopedPtrMap<NavigationID, scoped_ptr<Result>> ResultsMap;
// Returns true if the main page request is supported for prediction.
static bool IsHandledMainPage(net::URLRequest* request);
@@ -320,7 +321,6 @@ class ResourcePrefetchPredictor
scoped_ptr<PrefetchDataMap> host_table_cache_;
ResultsMap results_map_;
- STLValueDeleter<ResultsMap> results_map_deleter_;
ScopedObserver<history::HistoryService, history::HistoryServiceObserver>
history_service_observer_;

Powered by Google App Engine
This is Rietveld 408576698