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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2065713002: Removing unused GetAppIDForShelfIDConst. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_mus_order
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 return id_to_item_controller_map_.find(id) != 1089 return id_to_item_controller_map_.find(id) !=
1090 id_to_item_controller_map_.end(); 1090 id_to_item_controller_map_.end();
1091 } 1091 }
1092 1092
1093 const std::string& ChromeLauncherControllerImpl::GetAppIDForShelfID( 1093 const std::string& ChromeLauncherControllerImpl::GetAppIDForShelfID(
1094 ash::ShelfID id) { 1094 ash::ShelfID id) {
1095 LauncherItemController* controller = GetLauncherItemController(id); 1095 LauncherItemController* controller = GetLauncherItemController(id);
1096 return controller ? controller->app_id() : base::EmptyString(); 1096 return controller ? controller->app_id() : base::EmptyString();
1097 } 1097 }
1098 1098
1099 bool ChromeLauncherControllerImpl::GetAppIDForShelfIDConst(
1100 ash::ShelfID id,
1101 std::string* app_id) const {
1102 auto app = id_to_item_controller_map_.find(id);
1103 if (app == id_to_item_controller_map_.end()) {
1104 return false;
1105 } else {
1106 *app_id = app->second->app_id();
1107 return true;
1108 }
1109 }
1110
1111 void ChromeLauncherControllerImpl::PinAppWithID(const std::string& app_id) { 1099 void ChromeLauncherControllerImpl::PinAppWithID(const std::string& app_id) {
1112 if (GetPinnable(app_id) == AppListControllerDelegate::PIN_EDITABLE) 1100 if (GetPinnable(app_id) == AppListControllerDelegate::PIN_EDITABLE)
1113 DoPinAppWithID(app_id); 1101 DoPinAppWithID(app_id);
1114 else 1102 else
1115 NOTREACHED(); 1103 NOTREACHED();
1116 } 1104 }
1117 1105
1118 bool ChromeLauncherControllerImpl::IsAppPinned(const std::string& app_id) { 1106 bool ChromeLauncherControllerImpl::IsAppPinned(const std::string& app_id) {
1119 for (IDToItemControllerMap::const_iterator i = 1107 for (IDToItemControllerMap::const_iterator i =
1120 id_to_item_controller_map_.begin(); 1108 id_to_item_controller_map_.begin();
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 1882
1895 AppIconLoader* ChromeLauncherControllerImpl::GetAppIconLoaderForApp( 1883 AppIconLoader* ChromeLauncherControllerImpl::GetAppIconLoaderForApp(
1896 const std::string& app_id) { 1884 const std::string& app_id) {
1897 for (const auto& app_icon_loader : app_icon_loaders_) { 1885 for (const auto& app_icon_loader : app_icon_loaders_) {
1898 if (app_icon_loader->CanLoadImageForApp(app_id)) 1886 if (app_icon_loader->CanLoadImageForApp(app_id))
1899 return app_icon_loader.get(); 1887 return app_icon_loader.get();
1900 } 1888 }
1901 1889
1902 return nullptr; 1890 return nullptr;
1903 } 1891 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698