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

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

Issue 1141163003: Enabled first-run tutorial for ephemeral users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/chromeos/first_run/first_run.cc
diff --git a/chrome/browser/chromeos/first_run/first_run.cc b/chrome/browser/chromeos/first_run/first_run.cc
index 27b94fa2482cf8546a3fc33b7256d2607b85692c..81c860d003377e28bbc84e471253b224cbdf81e2 100644
--- a/chrome/browser/chromeos/first_run/first_run.cc
+++ b/chrome/browser/chromeos/first_run/first_run.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/chromeos/first_run/first_run_controller.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/extensions/app_launch_params.h"
#include "chrome/browser/ui/extensions/application_launch.h"
@@ -76,8 +77,13 @@ class DialogLauncher : public content::NotificationObserver {
bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI);
bool first_run_seen =
profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown);
+ bool is_pref_synced =
+ PrefServiceSyncable::FromProfile(profile_)->IsPrioritySyncing();
+ bool is_user_ephemeral = user_manager::UserManager::Get()
+ ->IsCurrentUserNonCryptohomeDataEphemeral();
if (!launched_in_telemetry &&
- ((is_user_new && !first_run_seen && !launched_in_test) ||
+ ((is_user_new && !first_run_seen &&
+ (is_pref_synced || !is_user_ephemeral) && !launched_in_test) ||
first_run_forced)) {
LaunchDialogForProfile(profile_);
}

Powered by Google App Engine
This is Rietveld 408576698