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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 557026: Disables pinned tabs until I land apps. I've #ifdef parts that are... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
===================================================================
--- chrome/browser/sessions/session_restore.cc (revision 37310)
+++ chrome/browser/sessions/session_restore.cc (working copy)
@@ -228,16 +228,13 @@
void FinishedTabCreation(bool succeeded, bool created_tabbed_browser) {
if (!created_tabbed_browser && always_create_tabbed_browser_) {
Browser* browser = Browser::Create(profile_);
- // Honor --pinned-tab-count if we're synchronous (which means we're run
- // during startup) and the user specified urls on the command line.
- bool honor_pin_tabs = synchronous_ && !urls_to_open_.empty();
if (urls_to_open_.empty()) {
// No tab browsers were created and no URLs were supplied on the command
// line. Add an empty URL, which is treated as opening the users home
// page.
urls_to_open_.push_back(GURL());
}
- AppendURLsToBrowser(browser, urls_to_open_, honor_pin_tabs);
+ AppendURLsToBrowser(browser, urls_to_open_);
browser->window()->Show();
}
@@ -321,7 +318,7 @@
current_browser->CloseAllTabs();
}
if (last_browser && !urls_to_open_.empty())
- AppendURLsToBrowser(last_browser, urls_to_open_, false);
+ AppendURLsToBrowser(last_browser, urls_to_open_);
// If last_browser is NULL and urls_to_open_ is non-empty,
// FinishedTabCreation will create a new TabbedBrowser and add the urls to
// it.
@@ -368,27 +365,12 @@
browser->GetSelectedTabContents()->view()->SetInitialFocus();
}
- // Appends the urls in |urls| to |browser|. If |pin_tabs| is true the first n
- // tabs are pinned, where n is the command line value for --pinned-tab-count.
+ // Appends the urls in |urls| to |browser|.
void AppendURLsToBrowser(Browser* browser,
- const std::vector<GURL>& urls,
- bool pin_tabs) {
- int pin_count = 0;
- if (pin_tabs) {
- std::string pin_count_string =
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kPinnedTabCount);
- if (!pin_count_string.empty())
- pin_count = StringToInt(pin_count_string);
- }
-
+ const std::vector<GURL>& urls) {
for (size_t i = 0; i < urls.size(); ++i) {
browser->AddTabWithURL(urls[i], GURL(), PageTransition::START_PAGE,
(i == 0), -1, false, NULL);
- if (i < static_cast<size_t>(pin_count)) {
- browser->tabstrip_model()->SetTabPinned(browser->tab_count() - 1,
- true);
- }
}
}
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698