Commit 622b764c authored by gab@chromium.org's avatar gab@chromium.org

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
parent a0b19528
...@@ -1047,13 +1047,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ...@@ -1047,13 +1047,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
if (!try_chrome.empty()) { if (!try_chrome.empty()) {
#if defined(OS_WIN) #if defined(OS_WIN)
// Setup.exe has determined that we need to run a retention experiment // Setup.exe has determined that we need to run a retention experiment
// and has lauched chrome to show the experiment UI. // and has lauched chrome to show the experiment UI. It is guaranteed that
if (process_singleton_->FoundOtherProcessWindow()) { // no other Chrome is currently running as the process singleton was
// It seems that we don't need to run the experiment since chrome // sucessfully grabbed above.
// in the same profile is already running.
VLOG(1) << "Retention experiment not required";
return TryChromeDialogView::NOT_NOW;
}
int try_chrome_int; int try_chrome_int;
base::StringToInt(try_chrome, &try_chrome_int); base::StringToInt(try_chrome, &try_chrome_int);
TryChromeDialogView::Result answer = TryChromeDialogView::Result answer =
......
...@@ -83,17 +83,6 @@ class ProcessSingleton : public base::NonThreadSafe { ...@@ -83,17 +83,6 @@ class ProcessSingleton : public base::NonThreadSafe {
// process should call this directly. // process should call this directly.
bool Create(const NotificationCallback& notification_callback); 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. // Clear any lock state during shutdown.
void Cleanup(); void Cleanup();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment