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

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

Issue 1697183003: Remove HostDesktopType from sessions and tab restore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-19
Patch Set: mac Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/metrics/user_metrics_action.h" 6 #include "base/metrics/user_metrics_action.h"
7 #include "base/supports_user_data.h" 7 #include "base/supports_user_data.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sessions/tab_restore_service_factory.h" 9 #include "chrome/browser/sessions/tab_restore_service_factory.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } // namespace 101 } // namespace
102 102
103 void RestoreTab(Browser* browser) { 103 void RestoreTab(Browser* browser) {
104 content::RecordAction(base::UserMetricsAction("RestoreTab")); 104 content::RecordAction(base::UserMetricsAction("RestoreTab"));
105 sessions::TabRestoreService* service = 105 sessions::TabRestoreService* service =
106 TabRestoreServiceFactory::GetForProfile(browser->profile()); 106 TabRestoreServiceFactory::GetForProfile(browser->profile());
107 if (!service) 107 if (!service)
108 return; 108 return;
109 109
110 if (service->IsLoaded()) { 110 if (service->IsLoaded()) {
111 service->RestoreMostRecentEntry(browser->live_tab_context(), 111 service->RestoreMostRecentEntry(browser->live_tab_context());
112 browser->host_desktop_type());
113 return; 112 return;
114 } 113 }
115 114
116 BrowserTabRestorer::CreateIfNecessary(browser); 115 BrowserTabRestorer::CreateIfNecessary(browser);
117 } 116 }
118 117
119 } // namespace chrome 118 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_live_tab_context.cc ('k') | chrome/browser/ui/browser_tabrestore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698