Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2345763002: Fix tabs duplication when restoring last closed window. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 if (hosted_app_controller_) 430 if (hosted_app_controller_)
431 hosted_app_controller_->UpdateLocationBarVisibility(false); 431 hosted_app_controller_->UpdateLocationBarVisibility(false);
432 432
433 // Create the extension window controller before sending notifications. 433 // Create the extension window controller before sending notifications.
434 extension_window_controller_.reset( 434 extension_window_controller_.reset(
435 new BrowserExtensionWindowController(this)); 435 new BrowserExtensionWindowController(this));
436 436
437 SessionService* session_service = 437 SessionService* session_service =
438 SessionServiceFactory::GetForProfileForSessionRestore(profile_); 438 SessionServiceFactory::GetForProfileForSessionRestore(profile_);
439 if (session_service) 439 if (session_service)
440 session_service->WindowOpened(this); 440 session_service->WindowOpened(this, params.dont_restore);
441 441
442 // TODO(beng): move to ChromeBrowserMain: 442 // TODO(beng): move to ChromeBrowserMain:
443 if (first_run::ShouldDoPersonalDataManagerFirstRun()) { 443 if (first_run::ShouldDoPersonalDataManagerFirstRun()) {
444 #if defined(OS_WIN) 444 #if defined(OS_WIN)
445 // Notify PDM that this is a first run. 445 // Notify PDM that this is a first run.
446 ImportAutofillDataWin( 446 ImportAutofillDataWin(
447 autofill::PersonalDataManagerFactory::GetForProfile(profile_)); 447 autofill::PersonalDataManagerFactory::GetForProfile(profile_));
448 #endif // defined(OS_WIN) 448 #endif // defined(OS_WIN)
449 } 449 }
450 450
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2564 if (contents && !allow_js_access) { 2564 if (contents && !allow_js_access) {
2565 contents->web_contents()->GetController().LoadURL( 2565 contents->web_contents()->GetController().LoadURL(
2566 target_url, 2566 target_url,
2567 content::Referrer(), 2567 content::Referrer(),
2568 ui::PAGE_TRANSITION_LINK, 2568 ui::PAGE_TRANSITION_LINK,
2569 std::string()); // No extra headers. 2569 std::string()); // No extra headers.
2570 } 2570 }
2571 2571
2572 return contents != NULL; 2572 return contents != NULL;
2573 } 2573 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698