forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_modes.cc
59 lines (47 loc) · 1.6 KB
/
install_modes.cc
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
54
55
56
57
58
59
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/install_static/install_modes.h"
#include "chrome/install_static/buildflags.h"
namespace install_static {
namespace {
#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
std::wstring GetClientsKeyPathForApp(const wchar_t* app_guid) {
return std::wstring(L"Software\\Google\\Update\\Clients\\").append(app_guid);
}
std::wstring GetClientStateKeyPathForApp(const wchar_t* app_guid) {
return std::wstring(L"Software\\Google\\Update\\ClientState\\")
.append(app_guid);
}
std::wstring GetClientStateMediumKeyPathForApp(const wchar_t* app_guid) {
return std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\")
.append(app_guid);
}
#else
std::wstring GetUnregisteredKeyPathForProduct() {
return std::wstring(L"Software\\").append(kProductPathName);
}
#endif
} // namespace
std::wstring GetClientsKeyPath(const wchar_t* app_guid) {
#if !BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
return GetUnregisteredKeyPathForProduct();
#else
return GetClientsKeyPathForApp(app_guid);
#endif
}
std::wstring GetClientStateKeyPath(const wchar_t* app_guid) {
#if !BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
return GetUnregisteredKeyPathForProduct();
#else
return GetClientStateKeyPathForApp(app_guid);
#endif
}
std::wstring GetClientStateMediumKeyPath(const wchar_t* app_guid) {
#if !BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
return GetUnregisteredKeyPathForProduct();
#else
return GetClientStateMediumKeyPathForApp(app_guid);
#endif
}
} // namespace install_static