summaryrefslogtreecommitdiffstats
path: root/chrome/app/google_update_client.h
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 03:39:22 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 03:39:22 +0000
commit4512f3acc3dab73e7fdcb8371d13f7bf46d8484b (patch)
treeb422b0d7be3ae72a1b53ce5822054a440bcc668f /chrome/app/google_update_client.h
parent3002a3d7dd1cf42d481c8fd626d872e93677a789 (diff)
downloadchromium_src-4512f3acc3dab73e7fdcb8371d13f7bf46d8484b.zip
chromium_src-4512f3acc3dab73e7fdcb8371d13f7bf46d8484b.tar.gz
chromium_src-4512f3acc3dab73e7fdcb8371d13f7bf46d8484b.tar.bz2
Rewrite of chrome.exe startup code
A lot of cruft and repeated code has deposited over the years on chrome's initialization code. This CL makes it all much more clear and straightforward. There is no fundamental change of behavior except the order of certain things is different but it should not alter the observed operation. - chrome's and chromium load is fundamentally the same but most of the code was repeated - chrome's way to load the dll was incorrect: using a relative path with LOAD_WITH_ALTERED_SEARCH_PATH - Use of SearchPath() was dangerous and not needed - removed google_update_client.cc and .h - removed bunch of #ifdefs TEST=all convered by UI tests already except [1] BUG=none [1] The only thing I don't see convered by test is the restart dialog ('woa! chrome crashed'). Review URL: http://codereview.chromium.org/345036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/google_update_client.h')
-rw-r--r--chrome/app/google_update_client.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/chrome/app/google_update_client.h b/chrome/app/google_update_client.h
deleted file mode 100644
index 82f7d43..0000000
--- a/chrome/app/google_update_client.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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.
-//
-// This is the Chrome-GoogleUpdater integration glue. Current features of this
-// code include:
-// * checks to ensure that client is properly registered with GoogleUpdater
-// * versioned directory launcher to allow for completely transparent silent
-// autoupdates
-
-
-#ifndef CHROME_APP_GOOGLE_UPDATE_CLIENT_H_
-#define CHROME_APP_GOOGLE_UPDATE_CLIENT_H_
-
-#include <windows.h>
-#include <tchar.h>
-
-#include <string>
-
-#include "sandbox/src/sandbox_factory.h"
-
-namespace google_update {
-
-class GoogleUpdateClient {
- public:
- GoogleUpdateClient();
- virtual ~GoogleUpdateClient();
-
- // Returns the full path of the DLL that is going to be loaded.
- // This function can be called only after Init().
- std::wstring GetDLLFullPath();
-
- // Returns the path containing 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.
- // Returns false if client is not properly registered with GoogleUpdate. If
- // not registered, autoupdates won't be performed for this client.
- bool Init(const wchar_t* client_guid, const wchar_t* client_dll);
-
- // Launches your app's main code and initializes Google Update services.
- // - looks up the registered version via GoogleUpdate, loads dll from version
- // dir (e.g. Program Files/Google/1.0.101.0/chrome.dll) and calls the
- // 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.
- // - instance is handle to the current instance of application
- // - sandbox provides information about sandbox services
- // - command_line contains command line parameters
- // - 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, sandbox::SandboxInterfaceInfo* sandbox,
- wchar_t* command_line, const char* entry_name, int* ret);
-
- private:
- // disallow copy ctor and operator=
- GoogleUpdateClient(const GoogleUpdateClient&);
- void operator=(const GoogleUpdateClient&);
-
- // The GUID that this client has registered with GoogleUpdate for autoupdate.
- std::wstring guid_;
- // The name of the dll to load.
- std::wstring dll_;
- // The current version of this client registered with GoogleUpdate.
- wchar_t* version_;
- // The location of current chrome.dll.
- std::wstring dll_path_;
-};
-
-} // namespace google_update
-
-#endif // CHROME_APP_GOOGLE_UPDATE_CLIENT_H_