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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 105733003: Move LaunchType out of ExtensionPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indenting Created 7 years 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/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 9400f5d1fffa40c9eee29e5697c572deb921178e..fc91631c6f150ccedbf2f97e91fb2a31141aae6e 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -701,8 +701,8 @@ void ChromeLauncherController::ActivateApp(const std::string& app_id,
LaunchApp(app_id, source, event_flags);
}
-extensions::ExtensionPrefs::LaunchType
- ChromeLauncherController::GetLaunchType(ash::LauncherID id) {
+extensions::LaunchType ChromeLauncherController::GetLaunchType(
+ ash::LauncherID id) {
DCHECK(HasItemController(id));
const Extension* extension = GetExtensionForAppID(
@@ -710,9 +710,10 @@ extensions::ExtensionPrefs::LaunchType
// An extension can be unloaded/updated/unavailable at any time.
if (!extension)
- return extensions::ExtensionPrefs::LAUNCH_TYPE_DEFAULT;
+ return extensions::LAUNCH_TYPE_DEFAULT;
- return profile_->GetExtensionService()->extension_prefs()->GetLaunchType(
+ return extensions::GetLaunchType(
+ profile_->GetExtensionService()->extension_prefs(),
extension);
}
@@ -808,12 +809,13 @@ void ChromeLauncherController::PinAppWithID(const std::string& app_id) {
void ChromeLauncherController::SetLaunchType(
ash::LauncherID id,
- extensions::ExtensionPrefs::LaunchType launch_type) {
+ extensions::LaunchType launch_type) {
if (!HasItemController(id))
return;
- profile_->GetExtensionService()->extension_prefs()->SetLaunchType(
- id_to_item_controller_map_[id]->app_id(), launch_type);
+ extensions::SetLaunchType(profile_->GetExtensionService()->extension_prefs(),
+ id_to_item_controller_map_[id]->app_id(),
+ launch_type);
}
void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) {
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.h ('k') | chrome/browser/ui/ash/launcher/launcher_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698