зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1820580 - Make toolkit/mozapps/defaultagent buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D171738
This commit is contained in:
Родитель
6bfe98d1df
Коммит
144eeecbf1
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "EventLog.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
// Cache entry version documentation:
|
||||
// Version 1:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <shlobj.h>
|
||||
|
||||
#include "EventLog.h"
|
||||
#include "Registry.h"
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef __DEFAULT_BROWSER_AGENT_EVENT_LOG_H__
|
||||
#define __DEFAULT_BROWSER_AGENT_EVENT_LOG_H__
|
||||
|
||||
#include "mozilla/Types.h"
|
||||
|
||||
MOZ_BEGIN_EXTERN_C
|
||||
|
||||
extern MOZ_EXPORT const wchar_t* gWinEventLogSourceName;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <shlwapi.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "EventLog.h"
|
||||
#include "UtfConvert.h"
|
||||
|
||||
#include "mozilla/Buffer.h"
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
#include "RemoteSettings.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "EventLog.h"
|
||||
#include "Registry.h"
|
||||
|
||||
#include "mozilla/Maybe.h"
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <taskschd.h>
|
||||
|
||||
#include "readstrings.h"
|
||||
#include "updatererrors.h"
|
||||
#include "EventLog.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define __DEFAULT_BROWSER_AGENT_SCHEDULED_TASK_H__
|
||||
|
||||
#include <windows.h>
|
||||
#include <wtypes.h>
|
||||
|
||||
// uniqueToken should be a string unique to the installation, so that a
|
||||
// separate task can be created for each installation. Typically this will be
|
||||
|
|
|
@ -11,11 +11,16 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
#include <knownfolders.h>
|
||||
#include <shlobj_core.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "Cache.h"
|
||||
#include "EventLog.h"
|
||||
#include "Notification.h"
|
||||
#include "Policy.h"
|
||||
#include "UtfConvert.h"
|
||||
#include "Registry.h"
|
||||
|
||||
#include "json/json.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "common.h"
|
||||
|
||||
#include "EventLog.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
ULONGLONG GetCurrentTimestamp() {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef __DEFAULT_BROWSER_AGENT_COMMON_H__
|
||||
#define __DEFAULT_BROWSER_AGENT_COMMON_H__
|
||||
|
||||
#include "mozilla/WinHeaderOnlyUtils.h"
|
||||
|
||||
#define AGENT_REGKEY_NAME \
|
||||
L"SOFTWARE\\" MOZ_APP_VENDOR "\\" MOZ_APP_BASENAME "\\Default Browser Agent"
|
||||
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
#include <shlwapi.h>
|
||||
#include <objbase.h>
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "nsAutoRef.h"
|
||||
#include "nsWindowsHelpers.h"
|
||||
#include "mozilla/WinHeaderOnlyUtils.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "Policy.h"
|
||||
#include "DefaultBrowser.h"
|
||||
#include "DefaultPDF.h"
|
||||
#include "EventLog.h"
|
||||
|
|
|
@ -48,8 +48,9 @@ static void WriteWindowsEventLogErrorBuffer(const wchar_t* eventSourceName,
|
|||
DeregisterEventSource(source);
|
||||
}
|
||||
|
||||
void WriteWindowsEventLogHresult(const wchar_t* eventSourceName, HRESULT hr,
|
||||
const char* sourceFile, int sourceLine) {
|
||||
inline void WriteWindowsEventLogHresult(const wchar_t* eventSourceName,
|
||||
HRESULT hr, const char* sourceFile,
|
||||
int sourceLine) {
|
||||
const wchar_t* format = L"0x%X in %S:%d";
|
||||
int bufferSize = _scwprintf(format, hr, sourceFile, sourceLine);
|
||||
++bufferSize; // Extra character for terminating null
|
||||
|
@ -63,10 +64,10 @@ void WriteWindowsEventLogHresult(const wchar_t* eventSourceName, HRESULT hr,
|
|||
}
|
||||
|
||||
MOZ_FORMAT_WPRINTF(1, 4)
|
||||
void WriteWindowsEventLogErrorMessage(const wchar_t* eventSourceName,
|
||||
const wchar_t* messageFormat,
|
||||
const char* sourceFile, int sourceLine,
|
||||
...) {
|
||||
inline void WriteWindowsEventLogErrorMessage(const wchar_t* eventSourceName,
|
||||
const wchar_t* messageFormat,
|
||||
const char* sourceFile,
|
||||
int sourceLine, ...) {
|
||||
// First assemble the passed message
|
||||
va_list ap;
|
||||
va_start(ap, sourceLine);
|
||||
|
|
Загрузка…
Ссылка в новой задаче