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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 1807743003: Remove HostDesktopType from AppLaunchParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp-parent
Patch Set: cros Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 const Extension* extension = GetPlatformApp(profile, app_id); 323 const Extension* extension = GetPlatformApp(profile, app_id);
324 // If |app_id| is a disabled or terminated platform app we handle it 324 // If |app_id| is a disabled or terminated platform app we handle it
325 // specially here, otherwise it will be handled below. 325 // specially here, otherwise it will be handled below.
326 if (extension) { 326 if (extension) {
327 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP); 327 RecordCmdLineAppHistogram(extensions::Manifest::TYPE_PLATFORM_APP);
328 AppLaunchParams params(profile, extension, 328 AppLaunchParams params(profile, extension,
329 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW, 329 extensions::LAUNCH_CONTAINER_NONE, NEW_WINDOW,
330 extensions::SOURCE_COMMAND_LINE); 330 extensions::SOURCE_COMMAND_LINE);
331 params.command_line = command_line_; 331 params.command_line = command_line_;
332 params.current_directory = cur_dir_; 332 params.current_directory = cur_dir_;
333 // If we are being launched from the command line, default to native
334 // desktop.
335 params.desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
336 ::OpenApplicationWithReenablePrompt(params); 333 ::OpenApplicationWithReenablePrompt(params);
337 return true; 334 return true;
338 } 335 }
339 } 336 }
340 337
341 // Open the required browser windows and tabs. First, see if 338 // Open the required browser windows and tabs. First, see if
342 // we're being run as an application window. If so, the user 339 // we're being run as an application window. If so, the user
343 // opened an app shortcut. Don't restore tabs or open initial 340 // opened an app shortcut. Don't restore tabs or open initial
344 // URLs in that case. The user should see the window as an app, 341 // URLs in that case. The user should see the window as an app,
345 // not as chrome. 342 // not as chrome.
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 #if defined(OS_WIN) 1004 #if defined(OS_WIN)
1008 TriggeredProfileResetter* triggered_profile_resetter = 1005 TriggeredProfileResetter* triggered_profile_resetter =
1009 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 1006 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
1010 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 1007 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
1011 if (triggered_profile_resetter) { 1008 if (triggered_profile_resetter) {
1012 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 1009 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1013 } 1010 }
1014 #endif // defined(OS_WIN) 1011 #endif // defined(OS_WIN)
1015 return has_reset_trigger; 1012 return has_reset_trigger;
1016 } 1013 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698