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

Side by Side Diff: chrome/browser/browser_shutdown.h

Issue 1376683003: Android: Mark some profile code as non-mobile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/browser_shutdown.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 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H__ 5 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H__
6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H__ 6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H__
7 7
8 class PrefRegistrySimple; 8 class PrefRegistrySimple;
9 9
10 namespace browser_shutdown { 10 namespace browser_shutdown {
(...skipping 11 matching lines...) Expand all
22 22
23 void RegisterPrefs(PrefRegistrySimple* registry); 23 void RegisterPrefs(PrefRegistrySimple* registry);
24 24
25 // Called when the browser starts shutting down so that we can measure shutdown 25 // Called when the browser starts shutting down so that we can measure shutdown
26 // time. 26 // time.
27 void OnShutdownStarting(ShutdownType type); 27 void OnShutdownStarting(ShutdownType type);
28 28
29 // Get the current shutdown type. 29 // Get the current shutdown type.
30 ShutdownType GetShutdownType(); 30 ShutdownType GetShutdownType();
31 31
32 #if !defined(OS_ANDROID)
32 // Performs the shutdown tasks that need to be done before 33 // Performs the shutdown tasks that need to be done before
33 // BrowserProcess and the various threads go away. 34 // BrowserProcess and the various threads go away.
34 // 35 //
35 // Returns true if the session should be restarted. 36 // Returns true if the session should be restarted.
36 bool ShutdownPreThreadsStop(); 37 bool ShutdownPreThreadsStop();
37 38
38 // Performs the remaining shutdown tasks after all threads but the 39 // Performs the remaining shutdown tasks after all threads but the
39 // main thread have been stopped. This includes deleting g_browser_process. 40 // main thread have been stopped. This includes deleting g_browser_process.
40 // 41 //
41 // The provided parameter indicates whether a preference to restart 42 // The provided parameter indicates whether a preference to restart
42 // the session was present. 43 // the session was present.
43 void ShutdownPostThreadsStop(bool restart_last_session); 44 void ShutdownPostThreadsStop(bool restart_last_session);
45 #endif
44 46
45 // Called at startup to create a histogram from our previous shutdown time. 47 // Called at startup to create a histogram from our previous shutdown time.
46 void ReadLastShutdownInfo(); 48 void ReadLastShutdownInfo();
47 49
48 // There are various situations where the browser process should continue to 50 // There are various situations where the browser process should continue to
49 // run after the last browser window has closed - the Mac always continues 51 // run after the last browser window has closed - the Mac always continues
50 // running until the user explicitly quits, and on Windows/Linux the application 52 // running until the user explicitly quits, and on Windows/Linux the application
51 // should not shutdown when the last browser window closes if there are any 53 // should not shutdown when the last browser window closes if there are any
52 // BackgroundContents running. 54 // BackgroundContents running.
53 // When the user explicitly chooses to shutdown the app (via the "Exit" or 55 // When the user explicitly chooses to shutdown the app (via the "Exit" or
54 // "Quit" menu items) BrowserList will call SetTryingToQuit() to tell itself to 56 // "Quit" menu items) BrowserList will call SetTryingToQuit() to tell itself to
55 // initiate a shutdown when the last window closes. 57 // initiate a shutdown when the last window closes.
56 // If the quit is aborted, then the flag should be reset. 58 // If the quit is aborted, then the flag should be reset.
57 59
58 // This is a low-level mutator; in general, don't call SetTryingToQuit(true), 60 // This is a low-level mutator; in general, don't call SetTryingToQuit(true),
59 // except from appropriate places in BrowserList. To quit, use usual means, 61 // except from appropriate places in BrowserList. To quit, use usual means,
60 // e.g., using |chrome_browser_application_mac::Terminate()| on the Mac, or 62 // e.g., using |chrome_browser_application_mac::Terminate()| on the Mac, or
61 // |BrowserList::CloseAllWindowsAndExit()| on other platforms. To stop quitting, 63 // |BrowserList::CloseAllWindowsAndExit()| on other platforms. To stop quitting,
62 // use |chrome_browser_application_mac::CancelTerminate()| on the Mac; other 64 // use |chrome_browser_application_mac::CancelTerminate()| on the Mac; other
63 // platforms can call SetTryingToQuit(false) directly. 65 // platforms can call SetTryingToQuit(false) directly.
64 void SetTryingToQuit(bool quitting); 66 void SetTryingToQuit(bool quitting);
65 67
66 // General accessor. 68 // General accessor.
67 bool IsTryingToQuit(); 69 bool IsTryingToQuit();
68 70
69 } // namespace browser_shutdown 71 } // namespace browser_shutdown
70 72
71 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ 73 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_shutdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698