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

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

Issue 8186: Plumb the referrer throughout the OpenURL APIs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/session_restore.h" 5 #include "chrome/browser/session_restore.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 DCHECK(browser); 336 DCHECK(browser);
337 DCHECK(browser->tab_count()); 337 DCHECK(browser->tab_count());
338 browser->SelectTabContentsAt( 338 browser->SelectTabContentsAt(
339 std::min(initial_tab_count + std::max(0, selected_session_index), 339 std::min(initial_tab_count + std::max(0, selected_session_index),
340 browser->tab_count() - 1), true); 340 browser->tab_count() - 1), true);
341 browser->ShowAndFit(true); 341 browser->ShowAndFit(true);
342 } 342 }
343 343
344 void AppendURLsToBrowser(Browser* browser, const std::vector<GURL>& urls) { 344 void AppendURLsToBrowser(Browser* browser, const std::vector<GURL>& urls) {
345 for (size_t i = 0; i < urls.size(); ++i) { 345 for (size_t i = 0; i < urls.size(); ++i) {
346 browser->AddTabWithURL(urls[i], PageTransition::START_PAGE, (i == 0), 346 browser->AddTabWithURL(urls[i], GURL(), PageTransition::START_PAGE,
347 NULL); 347 (i == 0), NULL);
348 } 348 }
349 } 349 }
350 350
351 // Invokes TabRestored on the SessionService for all tabs in browser after 351 // Invokes TabRestored on the SessionService for all tabs in browser after
352 // initial_count. 352 // initial_count.
353 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) { 353 void NotifySessionServiceOfRestoredTabs(Browser* browser, int initial_count) {
354 SessionService* session_service = profile_->GetSessionService(); 354 SessionService* session_service = profile_->GetSessionService();
355 for (int i = initial_count; i < browser->tab_count(); ++i) 355 for (int i = initial_count; i < browser->tab_count(); ++i)
356 session_service->TabRestored(browser->GetTabContentsAt(i)->controller()); 356 session_service->TabRestored(browser->GetTabContentsAt(i)->controller());
357 } 357 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 425
426 // static 426 // static
427 void SessionRestore::RestoreSessionSynchronously( 427 void SessionRestore::RestoreSessionSynchronously(
428 Profile* profile, 428 Profile* profile,
429 bool use_saved_session, 429 bool use_saved_session,
430 int show_command, 430 int show_command,
431 const std::vector<GURL>& urls_to_open) { 431 const std::vector<GURL>& urls_to_open) {
432 Restore(profile, use_saved_session, SW_SHOW, true, false, true, urls_to_open); 432 Restore(profile, use_saved_session, SW_SHOW, true, false, true, urls_to_open);
433 } 433 }
434 434
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/browser/site_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698