summaryrefslogtreecommitdiffstats
path: root/chrome/app/google_update_client.h
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-22 21:16:47 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-22 21:16:47 +0000
commitc9349d08ebc302d91d695f7abef4750d64a5dc31 (patch)
tree3c1e7a1e47a3efa2e1882230b8e03b118a14366f /chrome/app/google_update_client.h
parent2d5cdce4c2389657ad844a2456f00759806c2371 (diff)
downloadchromium_src-c9349d08ebc302d91d695f7abef4750d64a5dc31.zip
chromium_src-c9349d08ebc302d91d695f7abef4750d64a5dc31.tar.gz
chromium_src-c9349d08ebc302d91d695f7abef4750d64a5dc31.tar.bz2
Make chrome.exe read version from Software\Chromium instead of Google Update keys when running Chromium. With this change
now we can build a Chromium release that gets installed under Application Data\Chromium and actually runs. - Added a new file that has common functions used by google update client and chromium - Did some minor cleanup based on readability guidelines (alphabatical order etc). - We seem to be trying to avoid std::wstring at some places but are using it at other places. In future we should be just able to use std::wstring and get rid of StringCchDup. BUG=1296800 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/google_update_client.h')
-rw-r--r--chrome/app/google_update_client.h43
1 files changed, 19 insertions, 24 deletions
diff --git a/chrome/app/google_update_client.h b/chrome/app/google_update_client.h
index 684b073..4170b5d 100644
--- a/chrome/app/google_update_client.h
+++ b/chrome/app/google_update_client.h
@@ -42,17 +42,23 @@
#include <string>
+#include "sandbox/src/sandbox_factory.h"
+
namespace google_update {
class GoogleUpdateClient {
public:
- // callback prototype for GoogleUpdateClient::Launch entry_name
- typedef int (*GoogleUpdateEntry)(HINSTANCE instance, HINSTANCE prev_instance,
- wchar_t* command_line, int show_command);
-
GoogleUpdateClient();
virtual ~GoogleUpdateClient();
+ // Returns the path of the DLL that is going to be loaded.
+ // This function can be called only after Init().
+ std::wstring GetDLLPath();
+
+ // For the client guid, returns the associated version string, or NULL
+ // if Init() was unable to obtain one.
+ const wchar_t* GetVersion() const;
+
// Init must be called prior to other methods.
// client_guid is the guid that you registered with Google Update when you
// installed.
@@ -66,38 +72,27 @@ class GoogleUpdateClient {
// entry_name. If chrome.dll is found in this path the version is stored
// in the environment block such that subsequent launches invoke the
// save dll version.
- // The first four arguments are simply WinMain args passed through.
- // - entry_name is the (typedef) GoogleUpdateEntry that is called
+ // - instance is handle to the current instance of application
+ // - sandbox provides information about sandbox services
+ // - command_line contains command line parameters
+ // - show_command specifies how the window is to be shown
+ // - entry_name is the function of type DLL_MAIN that is called
+ // from chrome.dll
// - ret is an out param with the return value of entry
// Returns false if unable to load the dll or find entry_name's proc addr.
- bool Launch(HINSTANCE instance, HINSTANCE prev_instance,
+ bool Launch(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox,
wchar_t* command_line, int show_command, const char* entry_name,
int* ret);
- // For the client guid, fills in the path to the dir for the exe that
- // calls this function. (e.g. Program Files/Google/Chrome/ or
- // Documents and Settings\user\Local Settings\Application Data\Google\Chrome)
- // It also sets the user_mode_ depending on whether the exe was called
- // from Program Files location (user_mode_ = false) or not.
- void GetExePathAndInstallMode();
-
- // Returns the path of the DLL that is going to be loaded.
- // This function can be called only after Init().
- std::wstring GetDLLPath();
-
- // For the client guid, returns the associated version string, or NULL
- // if Init() was unable to obtain one.
- const wchar_t* GetVersion() const;
-
private:
// disallow copy ctor and operator=
GoogleUpdateClient(const GoogleUpdateClient&);
void operator=(const GoogleUpdateClient&);
// The GUID that this client has registered with GoogleUpdate for autoupdate.
- wchar_t* guid_;
+ std::wstring guid_;
// The name of the dll to load.
- wchar_t* dll_;
+ std::wstring dll_;
// The current version of this client registered with GoogleUpdate.
wchar_t* version_;
// The location of current chrome.dll.