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

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

Issue 130223002: Have browser process shutdown metro viewer on Metro -> Metro restart. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/lifetime/application_lifetime.h" 5 #include "chrome/browser/lifetime/application_lifetime.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/win/metro.h" 9 #include "base/win/metro.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 prefs->SetString(prefs::kRelaunchMode, 57 prefs->SetString(prefs::kRelaunchMode,
58 upgrade_util::kRelaunchModeDesktop); 58 upgrade_util::kRelaunchModeDesktop);
59 } else { 59 } else {
60 prefs->SetString(prefs::kRelaunchMode, 60 prefs->SetString(prefs::kRelaunchMode,
61 upgrade_util::kRelaunchModeMetro); 61 upgrade_util::kRelaunchModeMetro);
62 } 62 }
63 AttemptRestart(); 63 AttemptRestart();
64 } 64 }
65 65
66 #if defined(USE_AURA) 66 #if defined(USE_AURA)
67 void MetroExitHelper() {
68 aura::HandleMetroExit();
69 }
70
67 void ActivateDesktopHelper(AshExecutionStatus ash_execution_status) { 71 void ActivateDesktopHelper(AshExecutionStatus ash_execution_status) {
68 scoped_ptr<base::Environment> env(base::Environment::Create()); 72 scoped_ptr<base::Environment> env(base::Environment::Create());
69 std::string version_str; 73 std::string version_str;
70 74
71 // Get the version variable and remove it from the environment. 75 // Get the version variable and remove it from the environment.
72 if (!env->GetVar(chrome::kChromeVersionEnvVar, &version_str)) 76 if (!env->GetVar(chrome::kChromeVersionEnvVar, &version_str))
73 version_str.clear(); 77 version_str.clear();
74 78
75 base::FilePath exe_path; 79 base::FilePath exe_path;
76 if (!PathService::Get(base::FILE_EXE, &exe_path)) 80 if (!PathService::Get(base::FILE_EXE, &exe_path))
(...skipping 25 matching lines...) Expand all
102 } 106 }
103 107
104 void AttemptRestartToMetroMode() { 108 void AttemptRestartToMetroMode() {
105 PrefService* prefs = g_browser_process->local_state(); 109 PrefService* prefs = g_browser_process->local_state();
106 prefs->SetString(prefs::kRelaunchMode, 110 prefs->SetString(prefs::kRelaunchMode,
107 upgrade_util::kRelaunchModeMetro); 111 upgrade_util::kRelaunchModeMetro);
108 AttemptRestart(); 112 AttemptRestart();
109 } 113 }
110 114
111 } // namespace chrome 115 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698