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

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

Issue 93883004: Sync the launch type pref for apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unfix nit because it prevents testing of how invalid values are handled 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 unified diff | Download patch
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.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 else 812 else
813 NOTREACHED(); 813 NOTREACHED();
814 } 814 }
815 815
816 void ChromeLauncherController::SetLaunchType( 816 void ChromeLauncherController::SetLaunchType(
817 ash::LauncherID id, 817 ash::LauncherID id,
818 extensions::LaunchType launch_type) { 818 extensions::LaunchType launch_type) {
819 if (!HasItemController(id)) 819 if (!HasItemController(id))
820 return; 820 return;
821 821
822 extensions::SetLaunchType(profile_->GetExtensionService()->extension_prefs(), 822 extensions::SetLaunchType(profile_->GetExtensionService(),
823 id_to_item_controller_map_[id]->app_id(), 823 id_to_item_controller_map_[id]->app_id(),
824 launch_type); 824 launch_type);
825 } 825 }
826 826
827 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) { 827 void ChromeLauncherController::UnpinAppWithID(const std::string& app_id) {
828 if (CanPin()) 828 if (CanPin())
829 DoUnpinAppWithID(app_id); 829 DoUnpinAppWithID(app_id);
830 else 830 else
831 NOTREACHED(); 831 NOTREACHED();
832 } 832 }
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 } 2025 }
2026 2026
2027 void ChromeLauncherController::ReleaseProfile() { 2027 void ChromeLauncherController::ReleaseProfile() {
2028 if (app_sync_ui_state_) 2028 if (app_sync_ui_state_)
2029 app_sync_ui_state_->RemoveObserver(this); 2029 app_sync_ui_state_->RemoveObserver(this);
2030 2030
2031 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); 2031 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this);
2032 2032
2033 pref_change_registrar_.RemoveAll(); 2033 pref_change_registrar_.RemoveAll();
2034 } 2034 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_delegate.cc ('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