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

Side by Side Diff: chrome/installer/setup/user_experiment.h

Issue 2933043002: Installer support for Windows 10 inactive user toast. (Closed)
Patch Set: review feedback 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/user_experiment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_INSTALLER_SETUP_USER_EXPERIMENT_H_
6 #define CHROME_INSTALLER_SETUP_USER_EXPERIMENT_H_
7
8 #include "chrome/installer/util/experiment_metrics.h"
9 #include "chrome/installer/util/experiment_storage.h"
10 #include "chrome/installer/util/util_constants.h"
11
12 namespace base {
13 class CommandLine;
14 class FilePath;
15 } // namespace base
16
17 namespace installer {
18
19 class Experiment;
20 class ExperimentStorage;
21 class InstallationState;
22 class InstallerState;
23 class MasterPreferences;
24
25 // Returns true if a user of this Chrome install should participate in a
26 // post-update user experiment.
27 bool ShouldRunUserExperiment(const InstallerState& installer_state);
28
29 // Initiates the user experiment for a user of the current install. May only be
30 // called if eligibility had previously been evaluated via
31 // ShouldRunUserExperiment. |setup_path| is the path to the version of setup.exe
32 // that will be spawned to run the experiment. If |user_context| is true,
33 // setup.exe will be spawned directly; otherwise, it will be either be run as
34 // the interactive console user or on the next login via Active Setup.
35 void BeginUserExperiment(const InstallerState& installer_state,
36 const base::FilePath& setup_path,
37 bool user_context);
38
39 // Runs the experiment for the current user.
40 void RunUserExperiment(const base::CommandLine& command_line,
41 const MasterPreferences& master_preferences,
42 InstallationState* original_state,
43 InstallerState* installer_state);
44
45 // Writes the initial state |state| to the registry if there is no existing
46 // state for this or another user.
47 void WriteInitialState(ExperimentStorage* storage,
48 ExperimentMetrics::State state);
49
50 // Returns true if the install is associated with an enterprise brand code.
51 bool IsEnterpriseBrand();
52
53 // Returns true if the machine is joined to a Windows domain.
54 bool IsDomainJoined();
55
56 // Returns true if the machine is selected for participation in |current_study|.
57 // Dice are rolled on the first invocation to determine in which study the
58 // machine participates.
59 bool IsSelectedForStudy(ExperimentStorage::Lock* lock,
60 ExperimentStorage::Study current_study);
61
62 // Returns a group number based on the study in which the client participates.
63 int PickGroup(ExperimentStorage::Study participation);
64
65 // Returns true if the installed version of Chrome doesn't match the current
66 // executable's.
67 bool IsUpdateRenamePending();
68
69 // Launches Chrome to present the prompt.
70 void LaunchChrome(const InstallerState& installer_state,
71 const Experiment& experiment);
72
73 } // namespace installer
74
75 #endif // CHROME_INSTALLER_SETUP_USER_EXPERIMENT_H_
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/setup/user_experiment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698