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

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: 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"
(...skipping 27 matching lines...) Expand all
38 ExtensionService* service = 38 ExtensionService* service =
39 extensions::ExtensionSystem::Get(profile)->extension_service(); 39 extensions::ExtensionSystem::Get(profile)->extension_service();
40 if (!service) 40 if (!service)
41 return; 41 return;
42 42
43 const extensions::Extension* extension = 43 const extensions::Extension* extension =
44 service->GetExtensionById(extension_misc::kFirstRunDialogId, false); 44 service->GetExtensionById(extension_misc::kFirstRunDialogId, false);
45 if (!extension) 45 if (!extension)
46 return; 46 return;
47 47
48 // If voice interaction value prop has been accepted, the tutorial will be
49 // shown after the voice interaction OOBE flow.
50 if (profile->GetPrefs()->GetBoolean(
51 prefs::kArcVoiceInteractionValuePropAccepted))
xiyuan 2017/05/30 19:26:21 How would this play along with MaybeLaunchDialogAf
xc 2017/05/31 18:37:52 +1 We may have to show this more than once even if
yueli 2017/06/02 02:03:46 Done.
52 return;
53
48 OpenApplication(AppLaunchParams( 54 OpenApplication(AppLaunchParams(
49 profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, 55 profile, extension, extensions::LAUNCH_CONTAINER_WINDOW,
50 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL)); 56 WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL));
51 profile->GetPrefs()->SetBoolean(prefs::kFirstRunTutorialShown, true); 57 profile->GetPrefs()->SetBoolean(prefs::kFirstRunTutorialShown, true);
52 } 58 }
53 59
54 void TryLaunchFirstRunDialog(Profile* profile) { 60 void TryLaunchFirstRunDialog(Profile* profile) {
55 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 61 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
56 62
57 if (command_line->HasSwitch(switches::kOobeSkipPostLogin)) 63 if (command_line->HasSwitch(switches::kOobeSkipPostLogin))
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 user_manager::UserManager::Get()->GetActiveUser())); 138 user_manager::UserManager::Get()->GetActiveUser()));
133 } 139 }
134 140
135 void LaunchTutorial() { 141 void LaunchTutorial() {
136 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); 142 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true);
137 FirstRunController::Start(); 143 FirstRunController::Start();
138 } 144 }
139 145
140 } // namespace first_run 146 } // namespace first_run
141 } // namespace chromeos 147 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698