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

Unified Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 2341643002: Enhance chrome.app.window API for shelf integration with pinning support (cont.) (Closed)
Patch Set: Include AppLauncherId wrapper Created 4 years, 2 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/ash/chrome_launcher_prefs.cc
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index c57d1cd8a3d2c802bf3961c257972b8f822fc6ab..b16755fbc5369a1d668f92e68b0c46ddcc3338cf 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -640,18 +640,19 @@ std::vector<AppLauncherId> GetPinnedAppsFromPrefs(
std::vector<AppLauncherId>::const_reverse_iterator it;
for (it = policy_apps.app_list().rbegin();
it != policy_apps.app_list().rend(); ++it) {
- const std::string& app_id = (*it).ToString();
- if (app_id == kPinnedAppsPlaceholder)
+ const std::string& app_launcher_id_str = (*it).ToString();
+ if (app_launcher_id_str == kPinnedAppsPlaceholder)
continue;
// Check if we already processed current app.
- if (app_service->GetPinPosition(app_id).IsValid())
+ if (app_service->GetPinPosition(app_launcher_id_str).IsValid())
continue;
// Now move it to the front.
pin_infos.insert(pin_infos.begin(),
- PinInfo(AppLauncherId(app_id), front_position));
- app_service->SetPinPosition(app_id, front_position);
+ PinInfo(AppLauncherId((*it).app_id(), (*it).launch_id()),
+ front_position));
+ app_service->SetPinPosition(app_launcher_id_str, front_position);
front_position = front_position.CreateBefore();
}

Powered by Google App Engine
This is Rietveld 408576698