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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_views.cc

Issue 1106453002: Fixed app launcher crashing trying to load guest profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Windows compile. Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/app_list/app_list_service_views.h" 5 #include "chrome/browser/ui/app_list/app_list_service_views.h"
6 6
7 #include "chrome/browser/apps/scoped_keep_alive.h" 7 #include "chrome/browser/apps/scoped_keep_alive.h"
8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
9 #include "ui/app_list/app_list_switches.h" 9 #include "ui/app_list/app_list_switches.h"
10 #include "ui/app_list/views/app_list_main_view.h" 10 #include "ui/app_list/views/app_list_main_view.h"
(...skipping 12 matching lines...) Expand all
23 void AppListServiceViews::OnViewBeingDestroyed() { 23 void AppListServiceViews::OnViewBeingDestroyed() {
24 can_dismiss_ = true; 24 can_dismiss_ = true;
25 shower_.HandleViewBeingDestroyed(); 25 shower_.HandleViewBeingDestroyed();
26 } 26 }
27 27
28 void AppListServiceViews::Init(Profile* initial_profile) { 28 void AppListServiceViews::Init(Profile* initial_profile) {
29 PerformStartupChecks(initial_profile); 29 PerformStartupChecks(initial_profile);
30 } 30 }
31 31
32 void AppListServiceViews::ShowForProfile(Profile* requested_profile) { 32 void AppListServiceViews::ShowForProfile(Profile* requested_profile) {
33 // App list profiles should not be off-the-record. It is currently possible to
34 // get here in an off-the-record profile via the Web Store
35 // (http://crbug.com/416380).
36 // TODO(mgiuca): DCHECK that requested_profile->IsOffTheRecord() and
37 // requested_profile->IsGuestSession() are false, once that is resolved.
38
33 ShowForProfileInternal(requested_profile, 39 ShowForProfileInternal(requested_profile,
34 app_list::AppListModel::INVALID_STATE); 40 app_list::AppListModel::INVALID_STATE);
35 } 41 }
36 42
37 void AppListServiceViews::ShowForAppInstall(Profile* profile, 43 void AppListServiceViews::ShowForAppInstall(Profile* profile,
38 const std::string& extension_id, 44 const std::string& extension_id,
39 bool start_discovery_tracking) { 45 bool start_discovery_tracking) {
40 if (app_list::switches::IsExperimentalAppListEnabled()) 46 if (app_list::switches::IsExperimentalAppListEnabled())
41 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS); 47 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS);
42 48
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (state != app_list::AppListModel::INVALID_STATE) { 111 if (state != app_list::AppListModel::INVALID_STATE) {
106 app_list::ContentsView* contents_view = 112 app_list::ContentsView* contents_view =
107 shower_.app_list()->app_list_main_view()->contents_view(); 113 shower_.app_list()->app_list_main_view()->contents_view();
108 contents_view->SetActiveState(state, 114 contents_view->SetActiveState(state,
109 shower_.IsAppListVisible() /* animate */); 115 shower_.IsAppListVisible() /* animate */);
110 } 116 }
111 117
112 shower_.ShowForCurrentProfile(); 118 shower_.ShowForCurrentProfile();
113 RecordAppListLaunch(); 119 RecordAppListLaunch();
114 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_unittest.cc ('k') | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698