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

Side by Side Diff: chrome/browser/sessions/session_restore.cc

Issue 3825005: Fix syncing of sessions. Numerous changes have been made. Currently, the mode... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebased again Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sessions/session_restore.h" 5 #include "chrome/browser/sessions/session_restore.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 Browser::MAXIMIZED_STATE_MAXIMIZED : 315 Browser::MAXIMIZED_STATE_MAXIMIZED :
316 Browser::MAXIMIZED_STATE_UNMAXIMIZED); 316 Browser::MAXIMIZED_STATE_UNMAXIMIZED);
317 browser->CreateBrowserWindow(); 317 browser->CreateBrowserWindow();
318 318
319 // Restore and show the browser. 319 // Restore and show the browser.
320 const int initial_tab_count = browser->tab_count(); 320 const int initial_tab_count = browser->tab_count();
321 RestoreTabsToBrowser(*(*i), browser); 321 RestoreTabsToBrowser(*(*i), browser);
322 ShowBrowser(browser, initial_tab_count, 322 ShowBrowser(browser, initial_tab_count,
323 (*i)->selected_tab_index); 323 (*i)->selected_tab_index);
324 NotifySessionServiceOfRestoredTabs(browser, initial_tab_count); 324 NotifySessionServiceOfRestoredTabs(browser, initial_tab_count);
325 FinishedTabCreation(true, has_tabbed_browser);
326 } 325 }
326 FinishedTabCreation(true, has_tabbed_browser);
327 } 327 }
328 328
329 ~SessionRestoreImpl() { 329 ~SessionRestoreImpl() {
330 STLDeleteElements(&windows_); 330 STLDeleteElements(&windows_);
331 restoring = false; 331 restoring = false;
332 } 332 }
333 333
334 virtual void Observe(NotificationType type, 334 virtual void Observe(NotificationType type,
335 const NotificationSource& source, 335 const NotificationSource& source,
336 const NotificationDetails& details) { 336 const NotificationDetails& details) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 void SessionRestore::RestoreSessionSynchronously( 658 void SessionRestore::RestoreSessionSynchronously(
659 Profile* profile, 659 Profile* profile,
660 const std::vector<GURL>& urls_to_open) { 660 const std::vector<GURL>& urls_to_open) {
661 Restore(profile, NULL, true, false, true, urls_to_open); 661 Restore(profile, NULL, true, false, true, urls_to_open);
662 } 662 }
663 663
664 // static 664 // static
665 bool SessionRestore::IsRestoring() { 665 bool SessionRestore::IsRestoring() {
666 return restoring; 666 return restoring;
667 } 667 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/sync_options_handler.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698