diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 23:26:54 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 23:26:54 +0000 |
commit | a0c2b791e08881fd767deb20440266843e7490f2 (patch) | |
tree | d74e9a16f5ee87900bf481e460cf825892b4df29 /chrome | |
parent | 653b2a10f65a1c1bd42f22998bc9ed3a0268b88f (diff) | |
download | chromium_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')
-rwxr-xr-x | chrome/chrome.sln | 22 | ||||
-rwxr-xr-x | chrome/installer/gcapi/gcapi.cc | 26 | ||||
-rwxr-xr-x | chrome/installer/gcapi/gcapi.h | 27 | ||||
-rwxr-xr-x | chrome/installer/gcapi/gcapi_dll.vcproj | 56 | ||||
-rwxr-xr-x | chrome/installer/gcapi/gcapi_lib.vcproj | 56 |
5 files changed, 187 insertions, 0 deletions
diff --git a/chrome/chrome.sln b/chrome/chrome.sln index 9250e84..d2e3d0e 100755 --- a/chrome/chrome.sln +++ b/chrome/chrome.sln @@ -1920,6 +1920,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "te", "app\locales\te.vcproj {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28} = {D9DDAF60-663F-49CC-90DC-3D08CC3D1B28}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gcapi_lib", "installer\gcapi\gcapi_lib.vcproj", "{CD2FD73A-6AAB-4886-B887-760D18E8B635}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gcapi_dll", "installer\gcapi\gcapi_dll.vcproj", "{B802A2FE-E4E2-4F5A-905A-D5128875C954}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -2710,6 +2714,14 @@ Global {B55CA863-B374-4BAF-95AC-539E4FA4C90C}.Release|Mixed Platforms.Build.0 = Release|Win32
{B55CA863-B374-4BAF-95AC-539E4FA4C90C}.Release|Win32.ActiveCfg = Release|Win32
{B55CA863-B374-4BAF-95AC-539E4FA4C90C}.Release|Win32.Build.0 = Release|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Debug|Win32.Build.0 = Debug|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Release|Win32.ActiveCfg = Release|Win32
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954}.Release|Win32.Build.0 = Release|Win32
{B84553C8-5676-427B-B3E4-23DDDC4DBC7B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{B84553C8-5676-427B-B3E4-23DDDC4DBC7B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{B84553C8-5676-427B-B3E4-23DDDC4DBC7B}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -2854,6 +2866,14 @@ Global {CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}.Release|Mixed Platforms.Build.0 = Release|Win32
{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}.Release|Win32.ActiveCfg = Release|Win32
{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}.Release|Win32.Build.0 = Release|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Debug|Mixed Platforms.Build.0 = Debug|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Debug|Win32.Build.0 = Debug|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Release|Mixed Platforms.Build.0 = Release|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Release|Win32.ActiveCfg = Release|Win32
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635}.Release|Win32.Build.0 = Release|Win32
{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -3213,6 +3233,7 @@ Global {B2D715CE-4CBB-415A-A032-E700C90ADF91} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{B30B0E1F-1CE9-4DEF-A752-7498FD709C1F} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{B55CA863-B374-4BAF-95AC-539E4FA4C90C} = {873D095E-150E-4262-8C41-2D8ED02F0F57}
+ {B802A2FE-E4E2-4F5A-905A-D5128875C954} = {EB684A4B-98F7-4E68-8EA7-EA74ACF7060B}
{B84553C8-5676-427B-B3E4-23DDDC4DBC7B} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{B92AE829-E1CD-4781-824A-DCB1603A1672} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{B95AB527-F7DB-41E9-AD91-EB51EE0F56BE} = {97555540-8163-4D0F-BCAC-EFA0FFED3453}
@@ -3232,6 +3253,7 @@ Global {C9E0BD1D-B175-4A91-8380-3FDC81FAB9D7} = {1174D37F-6ABB-45DA-81B3-C631281273B7}
{CAB69303-0F02-4C68-A12E-FFE55DB52526} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
+ {CD2FD73A-6AAB-4886-B887-760D18E8B635} = {EB684A4B-98F7-4E68-8EA7-EA74ACF7060B}
{CD9CA56E-4E94-444C-87D4-58CA1E6F300D} = {EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}
{CE1426F6-7D2B-4574-9929-58387BF7B05F} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
{D13F055D-4428-48F4-ABF6-18359C76EDB0} = {2325D8C4-8EF5-42AC-8900-492225750DE4}
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>
|