| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 LOG(ERROR) << "Unexpected change of shelf item id: " << id; | 948 LOG(ERROR) << "Unexpected change of shelf item id: " << id; |
| 949 id_to_item_controller_map_.erase(iter); | 949 id_to_item_controller_map_.erase(iter); |
| 950 } | 950 } |
| 951 | 951 |
| 952 bool ChromeLauncherController::IsLoggedInAsGuest() { | 952 bool ChromeLauncherController::IsLoggedInAsGuest() { |
| 953 return profile_->IsGuestSession(); | 953 return profile_->IsGuestSession(); |
| 954 } | 954 } |
| 955 | 955 |
| 956 void ChromeLauncherController::CreateNewWindow() { | 956 void ChromeLauncherController::CreateNewWindow() { |
| 957 // Use the currently active user. | 957 // Use the currently active user. |
| 958 chrome::NewEmptyWindow(profile_, chrome::HOST_DESKTOP_TYPE_ASH); | 958 chrome::NewEmptyWindow(profile_); |
| 959 } | 959 } |
| 960 | 960 |
| 961 void ChromeLauncherController::CreateNewIncognitoWindow() { | 961 void ChromeLauncherController::CreateNewIncognitoWindow() { |
| 962 // Use the currently active user. | 962 // Use the currently active user. |
| 963 chrome::NewEmptyWindow(profile_->GetOffTheRecordProfile(), | 963 chrome::NewEmptyWindow(profile_->GetOffTheRecordProfile()); |
| 964 chrome::HOST_DESKTOP_TYPE_ASH); | |
| 965 } | 964 } |
| 966 | 965 |
| 967 void ChromeLauncherController::PersistPinnedState() { | 966 void ChromeLauncherController::PersistPinnedState() { |
| 968 if (ignore_persist_pinned_state_change_) | 967 if (ignore_persist_pinned_state_change_) |
| 969 return; | 968 return; |
| 970 // It is a coding error to call PersistPinnedState() if the pinned apps are | 969 // It is a coding error to call PersistPinnedState() if the pinned apps are |
| 971 // not user-editable. The code should check earlier and not perform any | 970 // not user-editable. The code should check earlier and not perform any |
| 972 // modification actions that trigger persisting the state. | 971 // modification actions that trigger persisting the state. |
| 973 // Mutating kPinnedLauncherApps is going to notify us and trigger us to | 972 // Mutating kPinnedLauncherApps is going to notify us and trigger us to |
| 974 // process the change. We don't want that to happen so remove ourselves as a | 973 // process the change. We don't want that to happen so remove ourselves as a |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2225 void ChromeLauncherController::ReleaseProfile() { | 2224 void ChromeLauncherController::ReleaseProfile() { |
| 2226 if (app_sync_ui_state_) | 2225 if (app_sync_ui_state_) |
| 2227 app_sync_ui_state_->RemoveObserver(this); | 2226 app_sync_ui_state_->RemoveObserver(this); |
| 2228 | 2227 |
| 2229 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); | 2228 extensions::ExtensionRegistry::Get(profile_)->RemoveObserver(this); |
| 2230 | 2229 |
| 2231 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); | 2230 PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this); |
| 2232 | 2231 |
| 2233 pref_change_registrar_.RemoveAll(); | 2232 pref_change_registrar_.RemoveAll(); |
| 2234 } | 2233 } |
| OLD | NEW |