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

Unified Diff: chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.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: Rebase. 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/ui/app_list/search/launcher_search/launcher_search_provider.h
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
index 24fa2b600f814e564471ff453584531ad8f03e1a..fa6fe3d4825af811eb9b302c018e7656ed54e82f 100644
--- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
+++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVIDER_H_
#define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVIDER_H_
+#include "base/containers/scoped_ptr_map.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/stl_util.h"
#include "base/strings/string16.h"
@@ -37,13 +39,10 @@ class LauncherSearchProvider : public SearchProvider {
// Dispatches |query| to LauncherSearchProvider service.
void StartInternal(const base::string16& query);
- // The search results of each extension. The STLValueDeleter will
- // automatically free the vectors in this map, but elements that are
- // individually erased or replaced must be manually deleted.
- typedef std::map<extensions::ExtensionId, ScopedVector<LauncherSearchResult>*>
- ExtensionResults;
- ExtensionResults extension_results_;
- STLValueDeleter<ExtensionResults> extension_results_deleter_;
+ // The search results of each extension.
+ base::ScopedPtrMap<extensions::ExtensionId,
+ scoped_ptr<ScopedVector<LauncherSearchResult>>>
+ extension_results_;
// A timer to delay query.
base::OneShotTimer<LauncherSearchProvider> query_timer_;

Powered by Google App Engine
This is Rietveld 408576698