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

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

Issue 2866034: Refactor shutdown code to allow win/linux to run after last browser closes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Uploaded patch that resolves merge issue Created 10 years, 5 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 | « chrome/browser/browser_shutdown.h ('k') | chrome/browser/browser_uitest.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_shutdown.h" 5 #include "chrome/browser/browser_shutdown.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 25 matching lines...) Expand all
36 36
37 #if defined(OS_WIN) 37 #if defined(OS_WIN)
38 #include "chrome/browser/rlz/rlz.h" 38 #include "chrome/browser/rlz/rlz.h"
39 #endif 39 #endif
40 40
41 using base::Time; 41 using base::Time;
42 using base::TimeDelta; 42 using base::TimeDelta;
43 43
44 namespace browser_shutdown { 44 namespace browser_shutdown {
45 45
46 #if defined(OS_MACOSX)
47 // Whether the browser is trying to quit (e.g., Quit chosen from menu). 46 // Whether the browser is trying to quit (e.g., Quit chosen from menu).
48 bool g_trying_to_quit = false; 47 bool g_trying_to_quit = false;
49 #endif // OS_MACOSX
50 48
51 Time shutdown_started_; 49 Time shutdown_started_;
52 ShutdownType shutdown_type_ = NOT_VALID; 50 ShutdownType shutdown_type_ = NOT_VALID;
53 int shutdown_num_processes_; 51 int shutdown_num_processes_;
54 int shutdown_num_processes_slow_; 52 int shutdown_num_processes_slow_;
55 53
56 bool delete_resources_on_shutdown = true; 54 bool delete_resources_on_shutdown = true;
57 55
58 const char kShutdownMsFile[] = "chrome_shutdown_ms.txt"; 56 const char kShutdownMsFile[] = "chrome_shutdown_ms.txt";
59 57
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 prefs->SetInteger(prefs::kShutdownNumProcesses, 0); 253 prefs->SetInteger(prefs::kShutdownNumProcesses, 0);
256 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0); 254 prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0);
257 255
258 // Read and delete the file on the file thread. 256 // Read and delete the file on the file thread.
259 ChromeThread::PostTask( 257 ChromeThread::PostTask(
260 ChromeThread::FILE, FROM_HERE, 258 ChromeThread::FILE, FROM_HERE,
261 NewRunnableFunction( 259 NewRunnableFunction(
262 &ReadLastShutdownFile, type, num_procs, num_procs_slow)); 260 &ReadLastShutdownFile, type, num_procs, num_procs_slow));
263 } 261 }
264 262
265 #if defined(OS_MACOSX)
266 void SetTryingToQuit(bool quitting) { 263 void SetTryingToQuit(bool quitting) {
267 g_trying_to_quit = quitting; 264 g_trying_to_quit = quitting;
268 } 265 }
269 266
270 bool IsTryingToQuit() { 267 bool IsTryingToQuit() {
271 return g_trying_to_quit; 268 return g_trying_to_quit;
272 } 269 }
273 #endif
274 270
275 } // namespace browser_shutdown 271 } // namespace browser_shutdown
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.h ('k') | chrome/browser/browser_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698