Commit cb719009 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

Adds call to SetNonBrowserUIDisplayed() if silent_launch is set

Also some other insignificant changes I came across when looking into
this.

BUG=none
TEST=none

Change-Id: Ia0b831db631c7663d41ddb828d78338b40d7f228
Reviewed-on: https://chromium-review.googlesource.com/794632Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519885}
parent 8f417bb7
...@@ -15,7 +15,7 @@ BrowserWindowHistogramHelper::MaybeRecordValueAndCreateInstanceOnBrowserPaint( ...@@ -15,7 +15,7 @@ BrowserWindowHistogramHelper::MaybeRecordValueAndCreateInstanceOnBrowserPaint(
ui::Compositor* compositor) { ui::Compositor* compositor) {
static bool did_first_paint = false; static bool did_first_paint = false;
if (did_first_paint) if (did_first_paint)
return std::unique_ptr<BrowserWindowHistogramHelper>(); return nullptr;
did_first_paint = true; did_first_paint = true;
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/search_engines/util.h" #include "components/search_engines/util.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "components/url_formatter/url_fixer.h" #include "components/url_formatter/url_fixer.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/child_process_security_policy.h"
...@@ -248,8 +249,8 @@ void DumpBrowserHistograms(const base::FilePath& output_file) { ...@@ -248,8 +249,8 @@ void DumpBrowserHistograms(const base::FilePath& output_file) {
// explicit user action. // explicit user action.
bool CanOpenProfileOnStartup(Profile* profile) { bool CanOpenProfileOnStartup(Profile* profile) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// On ChromeOS, ther user has alrady chosen and logged into the profile // On ChromeOS, the user has already chosen and logged into the profile before
// before Chrome starts up. // Chrome starts up.
return true; return true;
#else #else
// Profiles that require signin are not available. // Profiles that require signin are not available.
...@@ -557,9 +558,9 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( ...@@ -557,9 +558,9 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl"); TRACE_EVENT0("startup", "StartupBrowserCreator::ProcessCmdLineImpl");
DCHECK(last_used_profile); DCHECK(last_used_profile);
if (process_startup) { if (process_startup &&
if (command_line.HasSwitch(switches::kDisablePromptOnRepost)) command_line.HasSwitch(switches::kDisablePromptOnRepost)) {
content::NavigationController::DisablePromptOnRepost(); content::NavigationController::DisablePromptOnRepost();
} }
bool silent_launch = false; bool silent_launch = false;
...@@ -662,8 +663,11 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( ...@@ -662,8 +663,11 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
silent_launch = true; silent_launch = true;
// If we don't want to launch a new browser window or tab we are done here. // If we don't want to launch a new browser window or tab we are done here.
if (silent_launch) if (silent_launch) {
if (process_startup)
startup_metric_utils::SetNonBrowserUIDisplayed();
return true; return true;
}
if (command_line.HasSwitch(extensions::switches::kLoadApps) && if (command_line.HasSwitch(extensions::switches::kLoadApps) &&
can_use_last_profile) { can_use_last_profile) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment