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

Unified Diff: chrome/browser/chromeos/file_manager/file_tasks.cc

Issue 127683002: Less dependency for DriveAppRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_tasks.cc
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc
index 136ef377a6057f814556e6e4b1d8f0b8bba29285..e95fb878d4452d9f610196c42f232fe7fd4321a1 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -330,23 +330,21 @@ void FindDriveAppTasks(
if (!drive::util::IsUnderDriveMountPoint(file_path))
return;
- ScopedVector<drive::DriveAppInfo> app_info_list;
+ std::vector<drive::DriveAppInfo> app_info_list;
drive_app_registry.GetAppsForFile(file_path.Extension(),
mime_type,
&app_info_list);
if (is_first) {
// For the first file, we store all the info.
- for (size_t j = 0; j < app_info_list.size(); ++j) {
- const drive::DriveAppInfo& app_info = *app_info_list[j];
- drive_app_map[app_info.app_id] = app_info;
- }
+ for (size_t j = 0; j < app_info_list.size(); ++j)
+ drive_app_map[app_info_list[j].app_id] = app_info_list[j];
} else {
// For remaining files, take the intersection with the current
// result, based on the app id.
std::set<std::string> app_id_set;
for (size_t j = 0; j < app_info_list.size(); ++j)
- app_id_set.insert(app_info_list[j]->app_id);
+ app_id_set.insert(app_info_list[j].app_id);
for (DriveAppInfoMap::iterator iter = drive_app_map.begin();
iter != drive_app_map.end();) {
if (app_id_set.count(iter->first) == 0) {
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698