| Index: chrome/browser/process_singleton_win.cc
|
| diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
| index 707ccfc91a7a30c2b1c9093a012e2349c9d2f0bb..d7e3609dc6cb5c640a4c35c9d410da7a98c23625 100644
|
| --- a/chrome/browser/process_singleton_win.cc
|
| +++ b/chrome/browser/process_singleton_win.cc
|
| @@ -22,6 +22,7 @@
|
| #include "base/win/win_util.h"
|
| #include "base/win/windows_version.h"
|
| #include "base/win/wrapped_window_proc.h"
|
| +#include "chrome/browser/shell_integration.h"
|
| #include "chrome/browser/ui/simple_message_box.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_paths.h"
|
| @@ -172,9 +173,10 @@ bool ActivateMetroChrome() {
|
| // Following conditions apply:-
|
| // 1. Windows 8 or greater.
|
| // 2. Not in Windows 8 immersive mode.
|
| -// 3. Process integrity level is not high.
|
| -// 4. The profile data directory is the default directory .
|
| -// 5. Last used mode was immersive/machine is a tablet.
|
| +// 3. Chrome is default browser.
|
| +// 4. Process integrity level is not high.
|
| +// 5. The profile data directory is the default directory.
|
| +// 6. Last used mode was immersive/machine is a tablet.
|
| // TODO(ananta)
|
| // Move this function to a common place as the Windows 8 delegate_execute
|
| // handler can possibly use this.
|
| @@ -189,6 +191,9 @@ bool ShouldLaunchInWindows8ImmersiveMode(const FilePath& user_data_dir) {
|
| if (base::win::IsProcessImmersive(base::GetCurrentProcessHandle()))
|
| return false;
|
|
|
| + if (!ShellIntegration::IsDefaultBrowser())
|
| + return false;
|
| +
|
| base::IntegrityLevel integrity_level = base::INTEGRITY_UNKNOWN;
|
| base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(),
|
| &integrity_level);
|
| @@ -258,7 +263,6 @@ bool ProcessSingleton::EscapeVirtualization(const FilePath& user_data_dir) {
|
| ProcessSingleton::ProcessSingleton(const FilePath& user_data_dir)
|
| : window_(NULL), locked_(false), foreground_window_(NULL),
|
| is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE) {
|
| - FilePath default_user_data_dir;
|
| // For Windows 8 and above check if we need to relaunch into Windows 8
|
| // immersive mode.
|
| if (ShouldLaunchInWindows8ImmersiveMode(user_data_dir)) {
|
|
|