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

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

Issue 8271003: Shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 new_cl->AppendSwitchNative(i->first, i->second); 208 new_cl->AppendSwitchNative(i->first, i->second);
209 else 209 else
210 new_cl->AppendSwitch(i->first); 210 new_cl->AppendSwitch(i->first);
211 } 211 }
212 // Ensure restore last session is set. 212 // Ensure restore last session is set.
213 if (!new_cl->HasSwitch(switches::kRestoreLastSession)) 213 if (!new_cl->HasSwitch(switches::kRestoreLastSession))
214 new_cl->AppendSwitch(switches::kRestoreLastSession); 214 new_cl->AppendSwitch(switches::kRestoreLastSession);
215 215
216 upgrade_util::RelaunchChromeBrowser(*new_cl.get()); 216 upgrade_util::RelaunchChromeBrowser(*new_cl.get());
217 #else 217 #else
218 NOTIMPLEMENTED(); 218 // ChromeOS doesn't use kRestartLastSessionOnShutdown.
219 NOTREACHED();
219 #endif // !defined(OS_CHROMEOS) 220 #endif // !defined(OS_CHROMEOS)
220 } 221 }
221 222
222 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { 223 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) {
223 // Measure total shutdown time as late in the process as possible 224 // Measure total shutdown time as late in the process as possible
224 // and then write it to a file to be read at startup. 225 // and then write it to a file to be read at startup.
225 // We can't use prefs since all services are shutdown at this point. 226 // We can't use prefs since all services are shutdown at this point.
226 TimeDelta shutdown_delta = Time::Now() - shutdown_started_; 227 TimeDelta shutdown_delta = Time::Now() - shutdown_started_;
227 std::string shutdown_ms = 228 std::string shutdown_ms =
228 base::Int64ToString(shutdown_delta.InMilliseconds()); 229 base::Int64ToString(shutdown_delta.InMilliseconds());
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 312
312 bool ShuttingDownWithoutClosingBrowsers() { 313 bool ShuttingDownWithoutClosingBrowsers() {
313 #if defined(USE_X11) 314 #if defined(USE_X11)
314 if (GetShutdownType() == browser_shutdown::END_SESSION) 315 if (GetShutdownType() == browser_shutdown::END_SESSION)
315 return true; 316 return true;
316 #endif 317 #endif
317 return false; 318 return false;
318 } 319 }
319 320
320 } // namespace browser_shutdown 321 } // namespace browser_shutdown
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698