| Index: chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc b/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc
|
| index b3a8d26e93ac4f1844c860f2353ffe35c7f204ab..512f9b0f0b77534c00899c86647c73ad0ad78127 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc
|
| @@ -104,30 +104,33 @@ void ChromeMashShelfController::Init() {
|
|
|
| void ChromeMashShelfController::PinAppsFromPrefs() {
|
| Profile* profile = ProfileManager::GetActiveUserProfile();
|
| - std::vector<std::string> pinned_apps =
|
| + std::vector<ash::launcher::AppLauncherId> pinned_apps =
|
| ash::launcher::GetPinnedAppsFromPrefs(profile->GetPrefs(), &helper_);
|
|
|
| - for (const auto& app : pinned_apps) {
|
| - if (app == ash::launcher::kPinnedAppsPlaceholder)
|
| + for (const auto& app_launcher_id : pinned_apps) {
|
| + const std::string launcher_id = app_launcher_id.GetAsString();
|
| + if (launcher_id == ash::launcher::kPinnedAppsPlaceholder)
|
| continue;
|
|
|
| ash::mojom::ShelfItemPtr item(ash::mojom::ShelfItem::New());
|
| - item->app_id = app;
|
| - item->app_title = mojo::String::From(helper_.GetAppTitle(profile, app));
|
| + item->app_id = launcher_id;
|
| + item->app_title =
|
| + mojo::String::From(helper_.GetAppTitle(profile, launcher_id));
|
| ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
| const gfx::Image& image = rb.GetImageNamed(IDR_APP_DEFAULT_ICON);
|
| item->image = *image.ToSkBitmap();
|
| std::unique_ptr<ChromeShelfItemDelegate> delegate(
|
| - new ChromeShelfItemDelegate(app, this));
|
| + new ChromeShelfItemDelegate(launcher_id, this));
|
| shelf_controller_->PinItem(std::move(item),
|
| delegate->CreateInterfacePtrInfoAndBind(
|
| shelf_controller_.associated_group()));
|
| - app_id_to_item_delegate_.insert(std::make_pair(app, std::move(delegate)));
|
| + app_id_to_item_delegate_.insert(
|
| + std::make_pair(launcher_id, std::move(delegate)));
|
|
|
| - AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(app);
|
| + AppIconLoader* app_icon_loader = GetAppIconLoaderForApp(launcher_id);
|
| if (app_icon_loader) {
|
| - app_icon_loader->FetchImage(app);
|
| - app_icon_loader->UpdateImage(app);
|
| + app_icon_loader->FetchImage(launcher_id);
|
| + app_icon_loader->UpdateImage(launcher_id);
|
| }
|
| }
|
| }
|
|
|