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

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

Issue 1312693005: Remove migration of obsolete value for "session.restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url-to-restore-on-startup
Patch Set: Remove unused free function Created 5 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/profile_resetter/profile_resetter.h" 5 #include "chrome/browser/profile_resetter/profile_resetter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 master_settings_->GetUrlsToRestoreOnStartup()); 268 master_settings_->GetUrlsToRestoreOnStartup());
269 if (url_list) 269 if (url_list)
270 ListPrefUpdate(prefs, prefs::kURLsToRestoreOnStartup)->Swap(url_list.get()); 270 ListPrefUpdate(prefs, prefs::kURLsToRestoreOnStartup)->Swap(url_list.get());
271 271
272 int restore_on_startup; 272 int restore_on_startup;
273 if (master_settings_->GetRestoreOnStartup(&restore_on_startup)) 273 if (master_settings_->GetRestoreOnStartup(&restore_on_startup))
274 prefs->SetInteger(prefs::kRestoreOnStartup, restore_on_startup); 274 prefs->SetInteger(prefs::kRestoreOnStartup, restore_on_startup);
275 else 275 else
276 prefs->ClearPref(prefs::kRestoreOnStartup); 276 prefs->ClearPref(prefs::kRestoreOnStartup);
277 277
278 prefs->SetBoolean(prefs::kRestoreOnStartupMigrated, true);
279 MarkAsDone(STARTUP_PAGES); 278 MarkAsDone(STARTUP_PAGES);
280 } 279 }
281 280
282 void ProfileResetter::ResetPinnedTabs() { 281 void ProfileResetter::ResetPinnedTabs() {
283 // Unpin all the tabs. 282 // Unpin all the tabs.
284 for (chrome::BrowserIterator it; !it.done(); it.Next()) { 283 for (chrome::BrowserIterator it; !it.done(); it.Next()) {
285 if (it->is_type_tabbed() && it->profile() == profile_) { 284 if (it->is_type_tabbed() && it->profile() == profile_) {
286 TabStripModel* tab_model = it->tab_strip_model(); 285 TabStripModel* tab_model = it->tab_strip_model();
287 // Here we assume that indexof(any mini tab) < indexof(any normal tab). 286 // Here we assume that indexof(any mini tab) < indexof(any normal tab).
288 // If we unpin the tab, it can be moved to the right. Thus traversing in 287 // If we unpin the tab, it can be moved to the right. Thus traversing in
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 chrome_exe, 345 chrome_exe,
347 false, 346 false,
348 cancel, 347 cancel,
349 &shortcuts); 348 &shortcuts);
350 } 349 }
351 return shortcuts; 350 return shortcuts;
352 #else 351 #else
353 return std::vector<ShortcutCommand>(); 352 return std::vector<ShortcutCommand>();
354 #endif 353 #endif
355 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698