| Index: base/constants.h
|
| diff --git a/base/constants.h b/base/constants.h
|
| deleted file mode 100644
|
| index 7d660f1637a923992f7bd43f5f8c119957a2e07b..0000000000000000000000000000000000000000
|
| --- a/base/constants.h
|
| +++ /dev/null
|
| @@ -1,477 +0,0 @@
|
| -// Copyright 2003-2010 Google Inc.
|
| -//
|
| -// Licensed under the Apache License, Version 2.0 (the "License");
|
| -// you may not use this file except in compliance with the License.
|
| -// You may obtain a copy of the License at
|
| -//
|
| -// http://www.apache.org/licenses/LICENSE-2.0
|
| -//
|
| -// Unless required by applicable law or agreed to in writing, software
|
| -// distributed under the License is distributed on an "AS IS" BASIS,
|
| -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| -// See the License for the specific language governing permissions and
|
| -// limitations under the License.
|
| -// ========================================================================
|
| -
|
| -//
|
| -// Constants used by Omaha project
|
| -
|
| -#ifndef OMAHA_BASE_CONSTANTS_H_
|
| -#define OMAHA_BASE_CONSTANTS_H_
|
| -
|
| -#include <windows.h>
|
| -#include <tchar.h>
|
| -
|
| -namespace omaha {
|
| -
|
| -//
|
| -// Begin vendor-specific constants.
|
| -//
|
| -// When adding values here or using these values for a constant, add a test for
|
| -// the value to common\omaha_customization_unittest.cc.
|
| -// NOTE: The following are defined in main.scons:
|
| -// + FULL_COMPANY_NAME_ANSI
|
| -// + SHORT_COMPANY_NAME_ANSI
|
| -// + PRODUCT_NAME_ANSI
|
| -// + COMPANY_DOMAIN_ANSI
|
| -// + MAIN_DLL_BASE_NAME_ANSI
|
| -//
|
| -// *_IDENTIFIER assume that SHORT_COMPANY_NAME_ANSI and PRODUCT_NAME_ANSI are
|
| -// legal identifiers (i.e. one word).
|
| -
|
| -// TODO(omaha3): Move vendor-specific constants to a single file to make use
|
| -// of open source code by other vendors simpler.
|
| -// TODO(omaha3): Only use very specific const variables outside that file. Do
|
| -// not build values in other source files by concatenating preprocessor defines.
|
| -
|
| -// Full company name.
|
| -// FULL_COMPANY_NAME == "Google Inc."
|
| -const TCHAR* const kFullCompanyName = _T(FULL_COMPANY_NAME_ANSI);
|
| -
|
| -// Short company name (for use in paths and messages and to combine with product
|
| -// name). Does not include "Inc." and similar formal parts of the company name.
|
| -// SHORT_COMPANY_NAME == "Google"
|
| -#define SHORT_COMPANY_NAME _T(SHORT_COMPANY_NAME_ANSI)
|
| -const TCHAR* const kShortCompanyName = SHORT_COMPANY_NAME;
|
| -
|
| -// Product name.
|
| -// PRODUCT_NAME == "Update"
|
| -#define PRODUCT_NAME _T(PRODUCT_NAME_ANSI)
|
| -
|
| -// Company domain name base. Used for MIME type names.
|
| -// COMPANY_DOMAIN_BASE_ANSI = "google"
|
| -#define COMPANY_DOMAIN_BASE _T(COMPANY_DOMAIN_BASE_ANSI)
|
| -
|
| -// Company domain name base. Used for addresses.
|
| -// COMPANY_DOMAIN_ANSI = "google.com"
|
| -#define COMPANY_DOMAIN _T(COMPANY_DOMAIN_ANSI)
|
| -
|
| -// Company's internal network DNS domain. Used for detecting internal users.
|
| -// If the internal network uses a different domain than the public-facing
|
| -// COMPANY_DOMAIN, this will need to be changed.
|
| -// kCompanyInternalDnsName = ".google.com"
|
| -const TCHAR* const kCompanyInternalDnsName = _T(".") COMPANY_DOMAIN;
|
| -
|
| -// Company's internal network NetBIOS name. Used for detecting internal users.
|
| -// If the internal network uses a different domain than the public-facing
|
| -// COMPANY_DOMAIN_BASE, this will need to be changed.
|
| -// kCompanyInternalLanGroupName = "google"
|
| -const TCHAR* const kCompanyInternalLanGroupName = COMPANY_DOMAIN_BASE;
|
| -
|
| -// The base name of the main executable. Everything except the ".exe".
|
| -// Most files start with the main .exe's base name.
|
| -// MAIN_EXE_BASE_NAME = "GoogleUpdate"
|
| -#define MAIN_EXE_BASE_NAME _T(MAIN_EXE_BASE_NAME_ANSI)
|
| -
|
| -// Base name of the main DLL.
|
| -// MAIN_DLL_BASE_NAME = "goopdate"
|
| -#define MAIN_DLL_BASE_NAME _T(MAIN_DLL_BASE_NAME_ANSI)
|
| -
|
| -// Application name.
|
| -// Use the localized IDS_PRODUCT_DISPLAY_NAME or the formatted
|
| -// IDS_INSTALLER_DISPLAY_NAME instead when string is displayed to user.
|
| -// kAppName == "Google Update"
|
| -// TODO(omaha): Maybe rename all of these kOmahaAppName.
|
| -const TCHAR* const kAppName = _T(OMAHA_APP_NAME_ANSI);
|
| -
|
| -#define COMPANY_NAME_IDENTIFIER SHORT_COMPANY_NAME
|
| -#define PRODUCT_NAME_IDENTIFIER PRODUCT_NAME
|
| -#define APP_NAME_IDENTIFIER SHORT_COMPANY_NAME PRODUCT_NAME
|
| -
|
| -// Prefix for any Win32 objects (mutexes, events, etc.).
|
| -// TODO(omaha): This is used by several files in base/. Maybe we can use a
|
| -// similar prefix to avoid conflicts with some values in const_object_names.h.
|
| -// Consider moving this constant to const_object_names.h.
|
| -#define kLockPrefix \
|
| - _T("_") COMPANY_NAME_IDENTIFIER _T("_") PRODUCT_NAME_IDENTIFIER _T("_")
|
| -
|
| -const TCHAR* const kOmahaShellFileName = MAIN_EXE_BASE_NAME _T(".exe");
|
| -const TCHAR* const kCrashHandlerFileName = CRASH_HANDLER_NAME _T(".exe");
|
| -const TCHAR* const kOmahaDllName = MAIN_DLL_BASE_NAME _T(".dll");
|
| -const TCHAR* const kOmahaResourceDllNameFormat =
|
| - MAIN_DLL_BASE_NAME _T("res_%s.dll");
|
| -const TCHAR* const kOmahaBrokerFileName =
|
| - MAIN_EXE_BASE_NAME _T("Broker.exe");
|
| -const TCHAR* const kOmahaOnDemandFileName =
|
| - MAIN_EXE_BASE_NAME _T("OnDemand.exe");
|
| -const TCHAR* const kPSFileNameMachine = _T("psmachine.dll");
|
| -const TCHAR* const kPSFileNameUser = _T("psuser.dll");
|
| -
|
| -// TODO(omaha): Replace the following literal in clickonce\build.scons.
|
| -// '%s/GoogleUpdateSetup.exe'
|
| -
|
| -// These must be in sync with the WiX files.
|
| -// TODO(omaha): Make these constants in main.scons and use them in the .wxs
|
| -// files, kMsiUninstallKey, and elsewhere this GUID appears.
|
| -const TCHAR* const kHelperInstallerName = MAIN_EXE_BASE_NAME _T("Helper.msi");
|
| -const TCHAR* const kHelperInstallerProductGuid =
|
| - _T("{A92DAB39-4E2C-4304-9AB6-BC44E68B55E2}");
|
| -const TCHAR* const kHelperPatchName = MAIN_EXE_BASE_NAME _T("HelperPatch.msp");
|
| -const TCHAR* const kHelperPatchGuid =
|
| - _T("{E0D0D2C9-5836-4023-AB1D-54EC3B90AD03}");
|
| -
|
| -// The value that is used in the run key.
|
| -const TCHAR* const kRunValueName = kAppName;
|
| -
|
| -// The company and organization names as expected in Authenticode certificates.
|
| -const TCHAR* const kCertificateSubjectName = _T("Google Inc");
|
| -
|
| -// TODO(omaha): Try to use the above constants in the IDL file help strings.
|
| -// TODO(omaha): Consider moving uuid's from the IDL files to here too.
|
| -// TODO(omaha): Use these values for the registry maps definitions, and progid
|
| -// uses, such as ondemand.h.
|
| -
|
| -//
|
| -// Omaha's app ID
|
| -//
|
| -// TODO(omaha): Rename all of these "Omaha".
|
| -#define GOOPDATE_APP_ID _T("{430FD4D0-B729-4F61-AA34-91526481799D}")
|
| -const TCHAR* const kGoogleUpdateAppId = GOOPDATE_APP_ID;
|
| -const GUID kGoopdateGuid = {0x430FD4D0, 0xB729, 0x4F61,
|
| - {0xAA, 0x34, 0x91, 0x52, 0x64, 0x81, 0x79, 0x9D}};
|
| -
|
| -//
|
| -// Directory names
|
| -//
|
| -#define OFFLINE_DIR_NAME _T("Offline")
|
| -
|
| -#define OMAHA_REL_COMPANY_DIR SHORT_COMPANY_NAME
|
| -#define OMAHA_REL_CRASH_DIR OMAHA_REL_COMPANY_DIR _T("\\CrashReports")
|
| -#define OMAHA_REL_GOOPDATE_INSTALL_DIR \
|
| - OMAHA_REL_COMPANY_DIR _T("\\") PRODUCT_NAME
|
| -#define OMAHA_REL_LOG_DIR OMAHA_REL_GOOPDATE_INSTALL_DIR _T("\\Log")
|
| -#define OMAHA_REL_OFFLINE_STORAGE_DIR \
|
| - OMAHA_REL_GOOPDATE_INSTALL_DIR _T("\\") OFFLINE_DIR_NAME
|
| -#define OMAHA_REL_DOWNLOAD_STORAGE_DIR \
|
| - OMAHA_REL_GOOPDATE_INSTALL_DIR _T("\\Download")
|
| -#define OMAHA_REL_INSTALL_WORKING_DIR \
|
| - OMAHA_REL_GOOPDATE_INSTALL_DIR _T("\\Install")
|
| -
|
| -// This directory is relative to the user profile app data local.
|
| -#define LOCAL_APPDATA_REL_TEMP_DIR _T("\\Temp")
|
| -
|
| -//
|
| -// Registry keys and values
|
| -//
|
| -#define MACHINE_KEY_NAME _T("HKLM")
|
| -#define MACHINE_KEY MACHINE_KEY_NAME _T("\\")
|
| -#define USER_KEY_NAME _T("HKCU")
|
| -#define USER_KEY USER_KEY_NAME _T("\\")
|
| -#define USERS_KEY _T("HKU\\")
|
| -#define COMPANY_MAIN_KEY _T("Software\\") SHORT_COMPANY_NAME _T("\\")
|
| -#define GOOPDATE_MAIN_KEY COMPANY_MAIN_KEY PRODUCT_NAME _T("\\")
|
| -#define GOOPDATE_REG_RELATIVE_CLIENTS GOOPDATE_MAIN_KEY _T("Clients\\")
|
| -#define GOOPDATE_REG_RELATIVE_CLIENT_STATE GOOPDATE_MAIN_KEY _T("ClientState\\")
|
| -#define GOOPDATE_REG_RELATIVE_CLIENT_STATE_MEDIUM \
|
| - GOOPDATE_MAIN_KEY _T("ClientStateMedium\\")
|
| -#define COMPANY_POLICIES_MAIN_KEY \
|
| - _T("Software\\Policies\\") SHORT_COMPANY_NAME _T("\\")
|
| -#define GOOPDATE_POLICIES_RELATIVE COMPANY_POLICIES_MAIN_KEY \
|
| - PRODUCT_NAME _T("\\")
|
| -
|
| -#define USER_REG_GOOGLE USER_KEY COMPANY_MAIN_KEY
|
| -#define USER_REG_UPDATE USER_KEY GOOPDATE_MAIN_KEY
|
| -#define USER_REG_CLIENTS USER_KEY GOOPDATE_REG_RELATIVE_CLIENTS
|
| -#define USER_REG_CLIENTS_GOOPDATE USER_REG_CLIENTS GOOPDATE_APP_ID
|
| -#define USER_REG_CLIENT_STATE USER_KEY GOOPDATE_REG_RELATIVE_CLIENT_STATE
|
| -#define USER_REG_CLIENT_STATE_GOOPDATE USER_REG_CLIENT_STATE GOOPDATE_APP_ID
|
| -
|
| -#define MACHINE_REG_GOOGLE MACHINE_KEY COMPANY_MAIN_KEY
|
| -#define MACHINE_REG_UPDATE MACHINE_KEY GOOPDATE_MAIN_KEY
|
| -#define MACHINE_REG_CLIENTS MACHINE_KEY GOOPDATE_REG_RELATIVE_CLIENTS
|
| -#define MACHINE_REG_CLIENTS_GOOPDATE MACHINE_REG_CLIENTS GOOPDATE_APP_ID
|
| -#define MACHINE_REG_CLIENT_STATE MACHINE_KEY GOOPDATE_REG_RELATIVE_CLIENT_STATE
|
| -#define MACHINE_REG_CLIENT_STATE_GOOPDATE \
|
| - MACHINE_REG_CLIENT_STATE GOOPDATE_APP_ID
|
| -#define MACHINE_REG_CLIENT_STATE_MEDIUM \
|
| - MACHINE_KEY GOOPDATE_REG_RELATIVE_CLIENT_STATE_MEDIUM
|
| -
|
| -// Expands to HKEY_LOCAL_MACHINE\SOFTWARE\Google\UpdateDev
|
| -#define MACHINE_REG_UPDATE_DEV \
|
| - MACHINE_KEY COMPANY_MAIN_KEY PRODUCT_NAME _T("Dev\\")
|
| -
|
| -// Regular expressions for the servers allowed to use the Omaha plugins.
|
| -const TCHAR* const kSiteLockPatternStrings[] = {
|
| - _T("^(gears)|(mail)|(tools)|(www)|(desktop)|(pack)\\.google\\.com$"),
|
| - _T("^www\\.google\\.(ad)|(bg)|(ca)|(cn)|(cz)|(de)|(es)|(fi)|(fr)|(gr)|(hr)|(hu)|(it)|(ki)|(kr)|(lt)|(lv)|(nl)|(no)|(pl)|(pt)|(ro)|(ru)|(sk)|(sg)|(sl)|(sr)|(vn)$"), // NOLINT
|
| - _T("^www\\.google\\.co\\.(hu)|(id)|(il)|(it)|(jp)|(kr)|(th)|(uk)$"),
|
| - _T("^www\\.google\\.com\\.(ar)|(au)|(br)|(cn)|(et)|(gr)|(hr)|(ki)|(lv)|(om)|(pl)|(pt)|(ru)|(sg)|(sv)|(tr)|(vn)$"), // NOLINT
|
| -};
|
| -
|
| -//
|
| -// Compatible shell versions
|
| -// The following shell versions are compatible with the current version of
|
| -// goopdate.dll and do not need be replaced: 1.2.131.7 and 1.2.183.9.
|
| -//
|
| -const ULONGLONG kCompatibleOlderShellVersions[] = { 0x0001000200830007,
|
| - 0x0001000200B70009,
|
| - };
|
| -
|
| -//
|
| -// End vendor-specific constants.
|
| -//
|
| -
|
| -//
|
| -// Registry values under MACHINE_REG_UPDATE_DEV allow customization of the
|
| -// default behavior. The overrides apply for both user and machine
|
| -// instances of omaha.
|
| -//
|
| -// The values below can only be overriden in debug builds.
|
| -const TCHAR* const kRegValueNameOverInstall = _T("OverInstall");
|
| -const TCHAR* const kRegValueNameCrashIfSpecificError
|
| - = _T("CrashIfSpecificError");
|
| -
|
| -// The values below can be overriden in both debug and opt builds. Code Red url
|
| -// can be overriden but its value is defined in the Code Red module. The value
|
| -// name is "CodeRedUrl".
|
| -const TCHAR* const kRegValueNameUrl = _T("url");
|
| -const TCHAR* const kRegValueNamePingUrl = _T("PingUrl");
|
| -const TCHAR* const kRegValueNameCrashReportUrl = _T("CrashReportUrl");
|
| -const TCHAR* const kRegValueNameGetMoreInfoUrl = _T("MoreInfoUrl");
|
| -const TCHAR* const kRegValueNameUsageStatsReportUrl = _T("UsageStatsReportUrl");
|
| -const TCHAR* const kRegValueTestSource = _T("TestSource");
|
| -const TCHAR* const kRegValueAuCheckPeriodMs = _T("AuCheckPeriodMs");
|
| -const TCHAR* const kRegValueCrCheckPeriodMs = _T("CrCheckPeriodMs");
|
| -const TCHAR* const kRegValueProxyHost = _T("ProxyHost");
|
| -const TCHAR* const kRegValueProxyPort = _T("ProxyPort");
|
| -const TCHAR* const kRegValueMID = _T("mid");
|
| -
|
| -// The values below can be overriden in unofficial builds.
|
| -const TCHAR* const kRegValueNameWindowsInstalling = _T("WindowsInstalling");
|
| -
|
| -// Allows Omaha to log events in the Windows Event Log. This is
|
| -// a DWORD value 0: Log nothing, 1: Log warnings and errors, 2: Log everything.
|
| -const TCHAR* const kRegValueEventLogLevel = _T("LogEventLevel");
|
| -
|
| -enum LogEventLevel {
|
| - LOG_EVENT_LEVEL_NONE = 0,
|
| - LOG_EVENT_LEVEL_WARN_AND_ERROR = 1,
|
| - LOG_EVENT_LEVEL_ALL = 2
|
| -};
|
| -
|
| -// How often Omaha checks the server for updates.
|
| -const TCHAR* const kRegValueLastCheckPeriodSec = _T("LastCheckPeriodSec");
|
| -
|
| -// Uses the production or the test cup keys. Once the client has negotiated
|
| -// CUP credentials {sk, c} and it has saved them under the corresponding
|
| -// Google\Update\network key then the client does not need any of the CUP keys.
|
| -// To force the client to use test or production keys, {sk, c} credentials must
|
| -// be cleared too.
|
| -const TCHAR* const kRegValueCupKeys = _T("TestKeys");
|
| -
|
| -// Allow a custom host pattern to be specified. For example,
|
| -// "^https?://some_test_server\.google\.com/". For other examples, see
|
| -// kSiteLockPatternStrings. The detailed regular expression syntax is documented
|
| -// in the MSDN documentation for the CAtlRegExp class:
|
| -// http://msdn.microsoft.com/en-us/library/k3zs4axe.aspx.
|
| -const TCHAR* const kRegValueOneClickHostPattern = _T("OneClickHostPattern");
|
| -
|
| -// Disables the Code Red check.
|
| -const TCHAR* const kRegValueNoCodeRedCheck = _T("NoCrCheck");
|
| -
|
| -// Enables sending usage stats always if the value is present.
|
| -const TCHAR* const kRegValueForceUsageStats = _T("UsageStats");
|
| -
|
| -// Enables crash uploads if the value is 1. Crashes can be uploaded only if
|
| -// certain conditions are met. This value allows overriding of the default
|
| -// crash uploading behavior.
|
| -const TCHAR* const kRegValueAlwaysAllowCrashUploads =
|
| - _T("AlwaysAllowCrashUploads");
|
| -
|
| -// Enables monitoring the 'LastChecked' value for testing purposes. When
|
| -// the 'LastChecked' is deleted, the core starts a worker process to do an
|
| -// update check. This value must be set before the core process starts.
|
| -const TCHAR* const kRegValueMonitorLastChecked = _T("MonitorLastChecked");
|
| -
|
| -// The test_source value to use for Omaha instances that have
|
| -// customizations, and hence should be discarded from metrics.
|
| -const TCHAR* const kRegValueTestSourceAuto = _T("auto");
|
| -
|
| -// The network configuration to override the network detection.
|
| -// The corresponding value must have the following format:
|
| -// wpad=[false|true];script=script_url;proxy=host:port
|
| -const TCHAR* const kRegValueNetConfig = _T("NetConfig");
|
| -
|
| -// The maximum length of application and bundle names.
|
| -const int kMaxNameLength = 512;
|
| -
|
| -// Specifies whether a tristate item has a value and if so what the value is.
|
| -enum Tristate {
|
| - TRISTATE_FALSE,
|
| - TRISTATE_TRUE,
|
| - TRISTATE_NONE
|
| -};
|
| -
|
| -// Number of periods to use when abbreviating URLs
|
| -#define kAbbreviationPeriodLength 3
|
| -
|
| -// The Unicode "Byte Order Marker" character. This is the native
|
| -// encoding, i.e. after conversion from UTF-8 or whatever.
|
| -const wchar_t kUnicodeBom = 0xFEFF;
|
| -
|
| -// Using these constants will make ATL load the
|
| -// typelib directly from a DLL instead of looking up typelib
|
| -// registration in registry.
|
| -const DWORD kMajorTypeLibVersion = 0xFFFF;
|
| -const DWORD kMinorTypeLibVersion = 0xFFFF;
|
| -
|
| -// Brand id length
|
| -const int kBrandIdLength = 4;
|
| -
|
| -// Country code length according to ISO 3166-3.
|
| -const int kCountryCodeMaxLength = 5;
|
| -
|
| -// Language code length.
|
| -const int kLangMaxLength = 10;
|
| -
|
| -// When not specified, the country code defaults to USA
|
| -const TCHAR* const kDefaultCountryCode = _T("us");
|
| -
|
| -// the max length of the extra info we can store inside the install stubs.
|
| -const int kExtraMaxLength = 64 * 1024; // 64 KB
|
| -
|
| -// Default brand code value when one is not specified.
|
| -// This has been specifically assigned to Omaha.
|
| -const TCHAR* const kDefaultGoogleUpdateBrandCode = _T("GGLS");
|
| -
|
| -// The platform named used for Windows.
|
| -const TCHAR* const kPlatformWin = _T("win");
|
| -
|
| -// TODO(omaha3): Move goopdate-specific values in this file to const_goopdate.h.
|
| -// Maybe there should be a const_server_api.h file so the server API is
|
| -// documented in one location.
|
| -
|
| -// The following are response strings returned by the server.
|
| -// They must exactly match the strings returned by the server.
|
| -const TCHAR* const kResponseStatusOkValue = _T("ok");
|
| -const TCHAR* const kResponseStatusNoUpdate = _T("noupdate");
|
| -const TCHAR* const kResponseStatusRestrictedExportCountry = _T("restricted");
|
| -const TCHAR* const kResponseStatusOsNotSupported = _T("error-osnotsupported");
|
| -const TCHAR* const kResponseStatusUnKnownApplication =
|
| - _T("error-UnKnownApplication");
|
| -const TCHAR* const kResponseStatusInternalError = _T("error-internal");
|
| -const TCHAR* const kResponseStatusHashError = _T("error-hash");
|
| -const TCHAR* const kResponseStatusUnsupportedProtocol =
|
| - _T("error-unsupportedprotocol");
|
| -const TCHAR* const kResponseDataStatusNoData = _T("error-nodata");
|
| -
|
| -const TCHAR* const kLocalSystemSid = _T("S-1-5-18");
|
| -
|
| -// Time-related constants for defining durations.
|
| -const int kMsPerSec = 1000;
|
| -const int kSecPerMin = 60;
|
| -const int kMinPerHour = 60;
|
| -const int kSecondsPerHour = 60 * 60;
|
| -const int kSecondsPerDay = 24 * kSecondsPerHour;
|
| -
|
| -// Defines LastCheckPeriodSec: the time interval between actual server
|
| -// update checks. Opt builds have an aggressive check for updates every 5 hours.
|
| -// This introduces some time shift for computers connected all the time, for
|
| -// example, the update checks occur at: 12, 17, 22, 3, 8, 13, 18, etc...
|
| -//
|
| -// Since time computation for LastChecked is done in seconds, sometimes it
|
| -// can miss an update check, depending on arithmetic truncations.
|
| -// Adjust down the LastCheckPeriod so that the update worker does not miss it.
|
| -//
|
| -// Almost 5 hours for production users and almost hourly for internal users.
|
| -const int kLastCheckPeriodSec = 5 * 59 * kMinPerHour;
|
| -const int kLastCheckPeriodInternalUserSec = 1 * 59 * kMinPerHour;
|
| -
|
| -
|
| -const int kMinLastCheckPeriodSec = 60; // 60 seconds minimum.
|
| -
|
| -// Defines the time interval when the core is kicking off silent workers. When
|
| -// there is nothing to do, a worker does not take more than 200 ms to run.
|
| -// Internal users are supposed to update at least once every hour. Therefore,
|
| -// start workers every 30 minutes.
|
| -const int kAUCheckPeriodMs = 60 * 60 * 1000; // Hourly.
|
| -const int kAUCheckPeriodInternalUserMs = 30 * 60 * 1000; // 30 minutes.
|
| -
|
| -// Avoids starting workers too soon. This helps reduce disk thrashing at
|
| -// boot or logon, as well as needlessly starting a worker after setting up.
|
| -const int kUpdateTimerStartupDelayMinMs = 5 * 60 * 1000; // 5 minutes.
|
| -
|
| -// Maximum amount of time to wait before starting an update worker.
|
| -const int kUpdateTimerStartupDelayMaxMs = 15 * 60 * 1000; // 15 minutes.
|
| -
|
| -// Minimum AU check interval is lowered to 3 seconds to speed up test
|
| -// automation.
|
| -const int kMinAUCheckPeriodMs = 1000 * 3; // 3 seconds.
|
| -
|
| -// The Code Red check frequency.
|
| -const int kCodeRedCheckPeriodMs = 24 * 60 * 60 * 1000; // 24 hours.
|
| -const int kMinCodeRedCheckPeriodMs = 60 * 1000; // 1 minute.
|
| -
|
| -// The minimum amount of time after a /oem install that Omaha is considered to
|
| -// be in OEM mode regardless of audit mode.
|
| -const int kMinOemModeSec = 72 * 60 * 60; // 72 hours.
|
| -
|
| -// The amount of time to wait for the setup lock before giving up.
|
| -const int kSetupLockWaitMs = 1000; // 1 second.
|
| -
|
| -// The amount of time to wait for other instances to shutdown before giving up.
|
| -const int kSetupInstallShutdownWaitMs = 45 * 1000; // 45 seconds.
|
| -const int kSetupUpdateShutdownWaitMs = 3 * 60 * 1000; // 3 minutes.
|
| -
|
| -// Time to wait for the busy MSI when uninstalling. If MSI is found busy,
|
| -// Omaha won't uninstall. The timeout should be high enough so that it allows
|
| -// a normal application uninstall to finish and trigger an Omaha uninstall
|
| -// when needed.
|
| -const int kWaitForMSIExecuteMs = 5 * 60000; // 5 minutes.
|
| -
|
| -// Name of the language key-value pair inside the version resource.
|
| -const TCHAR* const kLanguageVersionName = _T("LanguageId");
|
| -
|
| -// Group name to use to read/write INI files for custom crash client info.
|
| -const TCHAR* const kCustomClientInfoGroup = _T("ClientCustomData");
|
| -
|
| -// *** ***
|
| -// *** Custom HTTP request headers sent by Omaha. ***
|
| -// *** ***
|
| -const TCHAR* const kHeaderUserAgent = _T("User-Agent");
|
| -
|
| -// The HRESULT and HTTP status code updated by the prior
|
| -// NetworkRequestImpl::DoSendHttpRequest() call.
|
| -const TCHAR* const kHeaderXLastHR = _T("X-Last-HR");
|
| -const TCHAR* const kHeaderXLastHTTPStatusCode = _T("X-Last-HTTP-Status-Code");
|
| -
|
| -// The "mid" value if it exists in HKLM\SOFTWARE\Google\UpdateDev.
|
| -const TCHAR* const kHeaderXMID = _T("X-MID");
|
| -
|
| -// The 407 retry count in the case of authenticated proxies.
|
| -const TCHAR* const kHeaderXProxyRetryCount = _T("X-Proxy-Retry-Count");
|
| -
|
| -// Indicates that we had to prompt the user for proxy credentials.
|
| -const TCHAR* const kHeaderXProxyManualAuth = _T("X-Proxy-Manual-Auth");
|
| -
|
| -// The age in seconds between the current time and when a ping was first
|
| -// persisted.
|
| -const TCHAR* const kHeaderXRequestAge = _T("X-RequestAge");
|
| -
|
| -// The current retry count defined by the outermost
|
| -// NetworkRequestImpl::DoSendWithRetries() call.
|
| -const TCHAR* const kHeaderXRetryCount = _T("X-Retry-Count");
|
| -
|
| -} // namespace omaha
|
| -
|
| -#endif // OMAHA_BASE_CONSTANTS_H_
|
|
|