| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 01774f168cb99f5fbb572ab17ceecdbb29223825..8f0fa09cd797fbd519bfb2f25b65a80fbdbad8d1 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -642,7 +642,7 @@ bool Browser::is_devtools() const {
|
| // Browser, Creation Helpers:
|
|
|
| // static
|
| -void Browser::NewEmptyWindow(Profile* profile) {
|
| +Browser* Browser::NewEmptyWindow(Profile* profile) {
|
| bool incognito = profile->IsOffTheRecord();
|
| PrefService* prefs = profile->GetPrefs();
|
| if (incognito) {
|
| @@ -660,23 +660,25 @@ void Browser::NewEmptyWindow(Profile* profile) {
|
|
|
| if (incognito) {
|
| content::RecordAction(UserMetricsAction("NewIncognitoWindow"));
|
| - OpenEmptyWindow(profile->GetOffTheRecordProfile());
|
| + return OpenEmptyWindow(profile->GetOffTheRecordProfile());
|
| } else {
|
| content::RecordAction(UserMetricsAction("NewWindow"));
|
| SessionService* session_service =
|
| SessionServiceFactory::GetForProfile(profile->GetOriginalProfile());
|
| if (!session_service ||
|
| !session_service->RestoreIfNecessary(std::vector<GURL>())) {
|
| - OpenEmptyWindow(profile->GetOriginalProfile());
|
| + return OpenEmptyWindow(profile->GetOriginalProfile());
|
| }
|
| }
|
| + return NULL;
|
| }
|
|
|
| // static
|
| -void Browser::OpenEmptyWindow(Profile* profile) {
|
| +Browser* Browser::OpenEmptyWindow(Profile* profile) {
|
| Browser* browser = Browser::Create(profile);
|
| browser->AddBlankTab(true);
|
| browser->window()->Show();
|
| + return browser;
|
| }
|
|
|
| // static
|
|
|