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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 12315094: Remove kDefaultHostDesktopType from browser_finder.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix StartupBrowserCreatorTest.ProfilesWithoutPagesNotLaunched Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 chrome::EndKeepAlive(); 358 chrome::EndKeepAlive();
359 359
360 // Reset all pref watching, as this object outlives the prefs system. 360 // Reset all pref watching, as this object outlives the prefs system.
361 profilePrefRegistrar_.reset(); 361 profilePrefRegistrar_.reset();
362 localPrefRegistrar_.RemoveAll(); 362 localPrefRegistrar_.RemoveAll();
363 363
364 [self unregisterEventHandlers]; 364 [self unregisterEventHandlers];
365 } 365 }
366 366
367 - (void)didEndMainMessageLoop { 367 - (void)didEndMainMessageLoop {
368 DCHECK_EQ(0u, chrome::GetBrowserCount([self lastProfile])); 368 DCHECK_EQ(0u, chrome::GetBrowserCount([self lastProfile],
369 if (!chrome::GetBrowserCount([self lastProfile])) { 369 chrome::HOST_DESKTOP_TYPE_NATIVE));
370 if (!chrome::GetBrowserCount([self lastProfile],
371 chrome::HOST_DESKTOP_TYPE_NATIVE)) {
370 // As we're shutting down, we need to nuke the TabRestoreService, which 372 // As we're shutting down, we need to nuke the TabRestoreService, which
371 // will start the shutdown of the NavigationControllers and allow for 373 // will start the shutdown of the NavigationControllers and allow for
372 // proper shutdown. If we don't do this, Chrome won't shut down cleanly, 374 // proper shutdown. If we don't do this, Chrome won't shut down cleanly,
373 // and may end up crashing when some thread tries to use the IO thread (or 375 // and may end up crashing when some thread tries to use the IO thread (or
374 // another thread) that is no longer valid. 376 // another thread) that is no longer valid.
375 TabRestoreServiceFactory::ResetForProfile([self lastProfile]); 377 TabRestoreServiceFactory::ResetForProfile([self lastProfile]);
376 } 378 }
377 } 379 }
378 380
379 // If the window has a tab controller, make "close window" be cmd-shift-w, 381 // If the window has a tab controller, make "close window" be cmd-shift-w,
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 1352
1351 //--------------------------------------------------------------------------- 1353 //---------------------------------------------------------------------------
1352 1354
1353 namespace app_controller_mac { 1355 namespace app_controller_mac {
1354 1356
1355 bool IsOpeningNewWindow() { 1357 bool IsOpeningNewWindow() {
1356 return g_is_opening_new_window; 1358 return g_is_opening_new_window;
1357 } 1359 }
1358 1360
1359 } // namespace app_controller_mac 1361 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698