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

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

Issue 187443008: Elim Browser::AppType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add non trusted type test Created 6 years, 9 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
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index f44a89f8cfa46d721b628544054fcd24013d760a..19b1e539062e8d8c959dd01f6a926b0ea4b54bc0 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -1067,8 +1067,16 @@ class SessionRestoreImpl : public content::NotificationObserver {
ui::WindowShowState show_state,
const std::string& app_name) {
Browser::CreateParams params(type, profile_, host_desktop_type_);
- params.app_name = app_name;
- params.initial_bounds = bounds;
+ if (!app_name.empty()) {
+ if (type == Browser::TYPE_TABBED) {
+ LOG(ERROR) << "Unexpected restore type in SessionRestore";
+ type = Browser::TYPE_TRUSTED_POPUP;
+ }
+ params = Browser::CreateParams::CreateForApp(
+ type, app_name, bounds, profile_, host_desktop_type_);
+ } else {
+ params.initial_bounds = bounds;
+ }
params.initial_show_state = show_state;
params.is_session_restore = true;
return new Browser(params);
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/ui/ash/accelerator_commands_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698