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

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

Issue 7215040: Fix relaunches on the Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 CommandLine::StringType switch_value = i->second; 224 CommandLine::StringType switch_value = i->second;
225 if (!switch_value.empty()) 225 if (!switch_value.empty())
226 new_cl->AppendSwitchNative(i->first, i->second); 226 new_cl->AppendSwitchNative(i->first, i->second);
227 else 227 else
228 new_cl->AppendSwitch(i->first); 228 new_cl->AppendSwitch(i->first);
229 } 229 }
230 // Ensure restore last session is set. 230 // Ensure restore last session is set.
231 if (!new_cl->HasSwitch(switches::kRestoreLastSession)) 231 if (!new_cl->HasSwitch(switches::kRestoreLastSession))
232 new_cl->AppendSwitch(switches::kRestoreLastSession); 232 new_cl->AppendSwitch(switches::kRestoreLastSession);
233 233
234 #if defined(OS_WIN) || defined(OS_LINUX)
235 upgrade_util::RelaunchChromeBrowser(*new_cl.get()); 234 upgrade_util::RelaunchChromeBrowser(*new_cl.get());
236 #endif // defined(OS_WIN) || defined(OS_LINUX)
237
238 #if defined(OS_MACOSX)
239 new_cl->AppendSwitch(switches::kActivateOnLaunch);
240 base::LaunchApp(*new_cl.get(), false, false, NULL);
241 #endif // defined(OS_MACOSX)
242
243 #else 235 #else
244 NOTIMPLEMENTED(); 236 NOTIMPLEMENTED();
245 #endif // !defined(OS_CHROMEOS) 237 #endif // !defined(OS_CHROMEOS)
246 } 238 }
247 239
248 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) { 240 if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) {
249 // Measure total shutdown time as late in the process as possible 241 // Measure total shutdown time as late in the process as possible
250 // and then write it to a file to be read at startup. 242 // and then write it to a file to be read at startup.
251 // We can't use prefs since all services are shutdown at this point. 243 // We can't use prefs since all services are shutdown at this point.
252 TimeDelta shutdown_delta = Time::Now() - shutdown_started_; 244 TimeDelta shutdown_delta = Time::Now() - shutdown_started_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 329
338 bool ShuttingDownWithoutClosingBrowsers() { 330 bool ShuttingDownWithoutClosingBrowsers() {
339 #if defined(USE_X11) 331 #if defined(USE_X11)
340 if (GetShutdownType() == browser_shutdown::END_SESSION) 332 if (GetShutdownType() == browser_shutdown::END_SESSION)
341 return true; 333 return true;
342 #endif 334 #endif
343 return false; 335 return false;
344 } 336 }
345 337
346 } // namespace browser_shutdown 338 } // namespace browser_shutdown
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698