summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 15:24:00 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 15:24:00 +0000
commit622b764c835745e98001dddc5498e4cf88fcf9a7 (patch)
tree637db81cbc9e38e1c16d96dd364858c9522d0908
parenta0b195281eddb8c084e7234608bac73b8b0f32b9 (diff)
downloadchromium_src-622b764c835745e98001dddc5498e4cf88fcf9a7.zip
chromium_src-622b764c835745e98001dddc5498e4cf88fcf9a7.tar.gz
chromium_src-622b764c835745e98001dddc5498e4cf88fcf9a7.tar.bz2
Remove ProcessSingleton::FoundOtherProcessWindow() as it is no longer required.
It was introduced in https://codereview.chromium.org/6625037 to prevent the toast from being shown when Chrome was already running; however, now that Chrome returns early if it fails to grab the singleton, this code is never reached in a state where the current process doesn't hold the singleton. Review URL: https://chromiumcodereview.appspot.com/11419258 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170957 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chrome_browser_main.cc10
-rw-r--r--chrome/browser/process_singleton.h11
2 files changed, 3 insertions, 18 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index f5e408a..6d1e207 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1047,13 +1047,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (!try_chrome.empty()) {
#if defined(OS_WIN)
// Setup.exe has determined that we need to run a retention experiment
- // and has lauched chrome to show the experiment UI.
- if (process_singleton_->FoundOtherProcessWindow()) {
- // It seems that we don't need to run the experiment since chrome
- // in the same profile is already running.
- VLOG(1) << "Retention experiment not required";
- return TryChromeDialogView::NOT_NOW;
- }
+ // and has lauched chrome to show the experiment UI. It is guaranteed that
+ // no other Chrome is currently running as the process singleton was
+ // sucessfully grabbed above.
int try_chrome_int;
base::StringToInt(try_chrome, &try_chrome_int);
TryChromeDialogView::Result answer =
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 961a51f..cdf3a61 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -83,17 +83,6 @@ class ProcessSingleton : public base::NonThreadSafe {
// process should call this directly.
bool Create(const NotificationCallback& notification_callback);
-#if defined(OS_WIN)
- // Used in specific cases to let us know that there is an existing instance
- // of Chrome running with this profile. In general, you should not use this
- // function. Instead consider using NotifyOtherProcessOrCreate().
- // For non profile-specific method, use
- // browser_util::IsBrowserAlreadyRunning().
- bool FoundOtherProcessWindow() const {
- return (NULL != remote_window_);
- }
-#endif // defined(OS_WIN)
-
// Clear any lock state during shutdown.
void Cleanup();