summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_closeable_state_watcher.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 18:15:31 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 18:15:31 +0000
commitc55a6f8026edcc373e2ad0b44c335949615db485 (patch)
tree08b63d4dc578b845f041239f2b56809e895bfa63 /chrome/browser/tab_closeable_state_watcher.cc
parent79b5354d3ff9e10b2eb1e07e87dcf2c08aa98c54 (diff)
downloadchromium_src-c55a6f8026edcc373e2ad0b44c335949615db485.zip
chromium_src-c55a6f8026edcc373e2ad0b44c335949615db485.tar.gz
chromium_src-c55a6f8026edcc373e2ad0b44c335949615db485.tar.bz2
Alternative method for dealing with zero browsers
This is an alternative method for allowing chromeos to go to zero browsers which is a bit more similar to what happens on the Mac. This method puts a lot of overhead into adding a new call to browser_shutdown::SetTryingToQuit(false) which there already is because of Mac behavior. Review URL: http://codereview.chromium.org/9723001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_closeable_state_watcher.cc')
-rw-r--r--chrome/browser/tab_closeable_state_watcher.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/chrome/browser/tab_closeable_state_watcher.cc b/chrome/browser/tab_closeable_state_watcher.cc
index 8952542..e600298 100644
--- a/chrome/browser/tab_closeable_state_watcher.cc
+++ b/chrome/browser/tab_closeable_state_watcher.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,25 +7,11 @@
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/chromeos/tab_closeable_state_watcher.h"
-#endif // defined(OS_CHROMEOS)
-
////////////////////////////////////////////////////////////////////////////////
// TabCloseableStateWatcher, static:
::TabCloseableStateWatcher* ::TabCloseableStateWatcher::Create() {
- ::TabCloseableStateWatcher* watcher = NULL;
-#if defined(OS_CHROMEOS)
- // We only watch closeable state of tab on chromeos, and only when it's not
- // disabled (tests will have the disable switch).
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableTabCloseableStateWatcher))
- watcher = new chromeos::TabCloseableStateWatcher();
-#endif // OS_CHROMEOS
- if (!watcher)
- watcher = new ::TabCloseableStateWatcher();
- return watcher;
+ return new ::TabCloseableStateWatcher();
}
bool TabCloseableStateWatcher::CanCloseTab(const Browser* browser) const {