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

Side by Side Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 10928064: Fix the blocked pluigin infobar for metro mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
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 #include "chrome/browser/ui/browser_list.h" 5 #include "chrome/browser/ui/browser_list.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // sign out. Session will be only restored if user has that setting set. 250 // sign out. Session will be only restored if user has that setting set.
251 // Same session restore behavior happens in case of full restart after update. 251 // Same session restore behavior happens in case of full restart after update.
252 AttemptUserExit(); 252 AttemptUserExit();
253 #else 253 #else
254 // Set the flag to restore state after the restart. 254 // Set the flag to restore state after the restart.
255 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true); 255 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, true);
256 AttemptExit(); 256 AttemptExit();
257 #endif 257 #endif
258 } 258 }
259 259
260 #if defined(OS_WIN)
261 void AttemptRestartWithModeSwitch() {
262 // The kRestartSwitchMode preference does not exists for Windows 7 and older
263 // operating systems so there is no need for OS version check.
264 PrefService* prefs = g_browser_process->local_state();
265 if (!prefs->HasPrefPath(prefs::kRestartSwitchMode))
266 return;
267 prefs->SetBoolean(prefs::kRestartSwitchMode, true);
268 browser::AttemptRestart();
269 }
270 #endif
271
260 void AttemptExit() { 272 void AttemptExit() {
261 // If we know that all browsers can be closed without blocking, 273 // If we know that all browsers can be closed without blocking,
262 // don't notify users of crashes beyond this point. 274 // don't notify users of crashes beyond this point.
263 // Note that MarkAsCleanShutdown does not set UMA's exit cleanly bit 275 // Note that MarkAsCleanShutdown does not set UMA's exit cleanly bit
264 // so crashes during shutdown are still reported in UMA. 276 // so crashes during shutdown are still reported in UMA.
265 if (AreAllBrowsersCloseable()) 277 if (AreAllBrowsersCloseable())
266 MarkAsCleanShutdown(); 278 MarkAsCleanShutdown();
267 AttemptExitInternal(); 279 AttemptExitInternal();
268 } 280 }
269 281
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 MessageLoop::current()) 364 MessageLoop::current())
353 CloseAllBrowsers(); 365 CloseAllBrowsers();
354 } 366 }
355 } 367 }
356 368
357 bool WillKeepAlive() { 369 bool WillKeepAlive() {
358 return g_keep_alive_count > 0; 370 return g_keep_alive_count > 0;
359 } 371 }
360 372
361 } // namespace browser 373 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.h ('k') | chrome/browser/plugin_infobar_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698