summaryrefslogtreecommitdiffstats
path: root/chrome/installer/gcapi
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-26 23:26:54 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-26 23:26:54 +0000
commita0c2b791e08881fd767deb20440266843e7490f2 (patch)
treed74e9a16f5ee87900bf481e460cf825892b4df29 /chrome/installer/gcapi
parent653b2a10f65a1c1bd42f22998bc9ed3a0268b88f (diff)
downloadchromium_src-a0c2b791e08881fd767deb20440266843e7490f2.zip
chromium_src-a0c2b791e08881fd767deb20440266843e7490f2.tar.gz
chromium_src-a0c2b791e08881fd767deb20440266843e7490f2.tar.bz2
* Check in criteria checker project for Chrome bundle deals.
Already reviewed at - http://codereview.chromium.org/6347/ BUG=1380504 Review URL: http://codereview.chromium.org/12702 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/gcapi')
-rwxr-xr-xchrome/installer/gcapi/gcapi.cc26
-rwxr-xr-xchrome/installer/gcapi/gcapi.h27
-rwxr-xr-xchrome/installer/gcapi/gcapi_dll.vcproj56
-rwxr-xr-xchrome/installer/gcapi/gcapi_lib.vcproj56
4 files changed, 165 insertions, 0 deletions
diff --git a/chrome/installer/gcapi/gcapi.cc b/chrome/installer/gcapi/gcapi.cc
new file mode 100755
index 0000000..79382c9
--- /dev/null
+++ b/chrome/installer/gcapi/gcapi.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2006-2008 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.
+
+#include "chrome/installer/gcapi/gcapi.h"
+
+#include <windows.h>
+
+DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(DWORD *reasons) {
+ BOOL result = TRUE;
+ DWORD local_reasons = 0;
+
+ // TODO(rahulk): Add all the checks we need before offering Google Chrome as
+ // part of bundle downloads.
+
+ // OS requirements
+
+ // Check if it is already installed?
+
+ // Privileges?
+
+ if (reasons != NULL) {
+ *reasons = local_reasons;
+ }
+ return result;
+}
diff --git a/chrome/installer/gcapi/gcapi.h b/chrome/installer/gcapi/gcapi.h
new file mode 100755
index 0000000..24998c6
--- /dev/null
+++ b/chrome/installer/gcapi/gcapi.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2006-2008 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_INSTALLER_GCAPI_GCAPI_H_
+#define CHROME_INSTALLER_GCAPI_GCAPI_H_
+
+#include <windows.h>
+
+extern "C" {
+// Error conditions for GoogleChromeCompatibilityCheck().
+#define GCCC_ERROR_ALREADYPRESENT 0x01
+#define GCCC_ERROR_ACCESSDENIED 0x02
+#define GCCC_ERROR_OSNOTSUPPORTED 0x04
+
+#define DLLEXPORT __declspec(dllexport)
+
+// This function returns TRUE if the Google Chrome should be offered.
+// If the answer is FALSE, the reasons DWORD explains why. If you don't care
+// for the reason, you can pass NULL for reasons.
+DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(DWORD *reasons);
+
+// Funtion pointer type declaration to use with GetProcAddress.
+typedef BOOL (__stdcall * GCCC_FN)(HKEY, DWORD *);
+} // extern "C"
+
+#endif // # CHROME_INSTALLER_GCAPI_GCAPI_H_
diff --git a/chrome/installer/gcapi/gcapi_dll.vcproj b/chrome/installer/gcapi/gcapi_dll.vcproj
new file mode 100755
index 0000000..ac09788
--- /dev/null
+++ b/chrome/installer/gcapi/gcapi_dll.vcproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="gcapi_dll"
+ ProjectGUID="{B802A2FE-E4E2-4F5A-905A-D5128875C954}"
+ RootNamespace="gcapi"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\gcapi.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gcapi.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/chrome/installer/gcapi/gcapi_lib.vcproj b/chrome/installer/gcapi/gcapi_lib.vcproj
new file mode 100755
index 0000000..2524db7
--- /dev/null
+++ b/chrome/installer/gcapi/gcapi_lib.vcproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="gcapi_lib"
+ ProjectGUID="{CD2FD73A-6AAB-4886-B887-760D18E8B635}"
+ RootNamespace="gcapi"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\debug.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(SolutionDir)..\build\common.vsprops;$(SolutionDir)..\build\release.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\gcapi.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\gcapi.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>