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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 14946003: Record first run startup metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 38ec3926364108e3bb7af3268c0ab13a89a7872a..41d34eec794cec31db12b4b128bf44629c8108a4 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -742,10 +742,11 @@ void DoPostImportTasks(Profile* profile, bool make_chrome_default) {
bool local_state_file_exists = file_util::PathExists(local_state_path);
// Launch the first run dialog only for certain builds, and only if the user
- // has not already set preferences.
- if (internal::IsOrganicFirstRun() && !local_state_file_exists) {
+ // has not already set preferences. If the dialog is shown, set state to avoid
+ // recording erroneous startup metrics.
jeremy 2013/05/05 12:35:56 I don't think you need to update the comment - the
gab 2013/05/06 16:19:54 Done.
+ if (internal::IsOrganicFirstRun() && !local_state_file_exists &&
+ ShowFirstRunDialog(profile)) {
jeremy 2013/05/05 12:35:56 Please phrase as a nested if rather than compound
gab 2013/05/06 16:19:54 Done.
startup_metric_utils::SetNonBrowserUIDisplayed();
- ShowFirstRunDialog(profile);
}
// Display the first run bubble if there is a default search provider.
TemplateURLService* template_url =

Powered by Google App Engine
This is Rietveld 408576698