summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/ui/webui/welcome/helpers.h
blob: 258c956b80ce67d1a7c034e929a28a99fb7fcf33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_HELPERS_H_
#define CHROME_BROWSER_UI_WEBUI_WELCOME_HELPERS_H_

#include <string>

#include "base/macros.h"
#include "base/metrics/field_trial_params.h"
#include "build/build_config.h"

namespace base {
class DictionaryValue;
struct Feature;
}  // namespace base

namespace policy {
class PolicyMap;
}  // namespace policy

class Profile;

namespace welcome {
#if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
// Onboarding groups are used for running field trials related to first run
// experience. This will make a new profile join whatever group is currently
// active. Any profile that is already part of an onboarding group will remain
// in that group.
void JoinOnboardingGroup(Profile* profile);
#endif  // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)

bool IsEnabled(Profile* profile);

bool IsAppVariationEnabled();

bool HasModulesToShow(Profile* profile);

base::DictionaryValue GetModules(Profile* profile);

// Exposed for testing.
extern const base::Feature kForceEnabled;

bool CanShowGoogleAppModuleForTesting(const policy::PolicyMap& policies);
bool CanShowNTPBackgroundModuleForTesting(const policy::PolicyMap& policies,
                                          Profile* profile);
bool CanShowSetDefaultModuleForTesting(const policy::PolicyMap& policies);
bool CanShowSigninModuleForTesting(const policy::PolicyMap& policies);

}  // namespace welcome

#endif  // CHROME_BROWSER_UI_WEBUI_WELCOME_HELPERS_H_