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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

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 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 #import "chrome/browser/ui/app_list/app_list_service_mac.h" 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 } 340 }
341 341
342 void AppListServiceMac::Init(Profile* initial_profile) { 342 void AppListServiceMac::Init(Profile* initial_profile) {
343 InitWithProfilePath(initial_profile, initial_profile->GetPath()); 343 InitWithProfilePath(initial_profile, initial_profile->GetPath());
344 } 344 }
345 345
346 void AppListServiceMac::InitWithProfilePath( 346 void AppListServiceMac::InitWithProfilePath(
347 Profile* initial_profile, 347 Profile* initial_profile,
348 const base::FilePath& profile_path) { 348 const base::FilePath& profile_path) {
349 // App list profiles should not be off-the-record. It is currently possible to
350 // get here in an off-the-record profile via the Web Store
351 // (http://crbug.com/416380).
352 // TODO(mgiuca): DCHECK that requested_profile->IsOffTheRecord() and
353 // requested_profile->IsGuestSession() are false, once that is resolved.
354
349 // On Mac, Init() is called multiple times for a process: any time there is no 355 // On Mac, Init() is called multiple times for a process: any time there is no
350 // browser window open and a new window is opened, and during process startup 356 // browser window open and a new window is opened, and during process startup
351 // to handle the silent launch case (e.g. for app shims). In the startup case, 357 // to handle the silent launch case (e.g. for app shims). In the startup case,
352 // a profile has not yet been determined so |initial_profile| will be NULL. 358 // a profile has not yet been determined so |initial_profile| will be NULL.
353 static bool init_called_with_profile = false; 359 static bool init_called_with_profile = false;
354 if (initial_profile && !init_called_with_profile) { 360 if (initial_profile && !init_called_with_profile) {
355 init_called_with_profile = true; 361 init_called_with_profile = true;
356 PerformStartupChecks(initial_profile); 362 PerformStartupChecks(initial_profile);
357 PrefService* local_state = g_browser_process->local_state(); 363 PrefService* local_state = g_browser_process->local_state();
358 if (!IsAppLauncherEnabled()) { 364 if (!IsAppLauncherEnabled()) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 579
574 - (void)animationDidEnd:(NSAnimation*)animation { 580 - (void)animationDidEnd:(NSAnimation*)animation {
575 content::BrowserThread::PostTask( 581 content::BrowserThread::PostTask(
576 content::BrowserThread::UI, 582 content::BrowserThread::UI,
577 FROM_HERE, 583 FROM_HERE,
578 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, 584 base::Bind(&AppListServiceMac::WindowAnimationDidEnd,
579 base::Unretained(GetActiveInstance()))); 585 base::Unretained(GetActiveInstance())));
580 } 586 }
581 587
582 @end 588 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.cc ('k') | chrome/browser/ui/app_list/app_list_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698