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

Side by Side Diff: chrome/browser/chromeos/first_run/first_run.cc

Issue 2912593002: Create OOBE screen for Voice Interaction value proposition (Closed)
Patch Set: Create OOBE screen for Voice Interaction value proposition Created 3 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/first_run/first_run_controller.h" 10 #include "chrome/browser/chromeos/first_run/first_run_controller.h"
11 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
12 #include "chrome/browser/chromeos/login/wizard_controller.h"
11 #include "chrome/browser/chromeos/profiles/profile_helper.h" 13 #include "chrome/browser/chromeos/profiles/profile_helper.h"
12 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/prefs/pref_service_syncable_util.h" 15 #include "chrome/browser/prefs/pref_service_syncable_util.h"
14 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/extensions/app_launch_params.h" 17 #include "chrome/browser/ui/extensions/app_launch_params.h"
16 #include "chrome/browser/ui/extensions/application_launch.h" 18 #include "chrome/browser/ui/extensions/application_launch.h"
17 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/extensions/extension_constants.h" 20 #include "chrome/common/extensions/extension_constants.h"
19 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
20 #include "chromeos/chromeos_switches.h" 22 #include "chromeos/chromeos_switches.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 97 }
96 98
97 ~DialogLauncher() override {} 99 ~DialogLauncher() override {}
98 100
99 void Observe(int type, 101 void Observe(int type,
100 const content::NotificationSource& source, 102 const content::NotificationSource& source,
101 const content::NotificationDetails& details) override { 103 const content::NotificationDetails& details) override {
102 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); 104 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED);
103 DCHECK(content::Details<const user_manager::User>(details).ptr() == 105 DCHECK(content::Details<const user_manager::User>(details).ptr() ==
104 ProfileHelper::Get()->GetUserByProfile(profile_)); 106 ProfileHelper::Get()->GetUserByProfile(profile_));
105 TryLaunchFirstRunDialog(profile_); 107
108 // If voice interaction value prop has been accepted, the tutorial will be
109 // shown after the voice interaction OOBE flow.
110 if (!profile_->GetPrefs()->GetBoolean(
111 prefs::kArcVoiceInteractionValuePropAccepted))
112 TryLaunchFirstRunDialog(profile_);
106 delete this; 113 delete this;
107 } 114 }
108 115
109 private: 116 private:
110 Profile* profile_; 117 Profile* profile_;
111 content::NotificationRegistrar registrar_; 118 content::NotificationRegistrar registrar_;
112 119
113 DISALLOW_COPY_AND_ASSIGN(DialogLauncher); 120 DISALLOW_COPY_AND_ASSIGN(DialogLauncher);
114 }; 121 };
115 122
(...skipping 16 matching lines...) Expand all
132 user_manager::UserManager::Get()->GetActiveUser())); 139 user_manager::UserManager::Get()->GetActiveUser()));
133 } 140 }
134 141
135 void LaunchTutorial() { 142 void LaunchTutorial() {
136 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); 143 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true);
137 FirstRunController::Start(); 144 FirstRunController::Start();
138 } 145 }
139 146
140 } // namespace first_run 147 } // namespace first_run
141 } // namespace chromeos 148 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698