summaryrefslogtreecommitdiffstats
path: root/chrome/app/client_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/app/client_util.h')
-rw-r--r--chrome/app/client_util.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/chrome/app/client_util.h b/chrome/app/client_util.h
index 8b6184aa..5b8ebf6 100644
--- a/chrome/app/client_util.h
+++ b/chrome/app/client_util.h
@@ -23,7 +23,7 @@ base::string16 GetExecutablePath();
// string if none found.
base::string16 GetCurrentModuleVersion();
-// Implements the common aspects of loading the main dll for both chrome and
+// Implements the common aspects of loading chrome.dll for both chrome and
// chromium scenarios, which are in charge of implementing two abstract
// methods: GetRegistryPath() and OnBeforeLaunch().
class MainDllLoader {
@@ -42,25 +42,28 @@ class MainDllLoader {
// persistent mode an upgrade is detected.
void RelaunchChromeBrowserWithNewCommandLineIfNeeded();
- protected:
// Called after chrome.dll has been loaded but before the entry point
// is invoked. Derived classes can implement custom actions here.
// |dll_path| refers to the path of the Chrome dll being loaded.
- virtual void OnBeforeLaunch(const base::string16& dll_path) = 0;
+ virtual void OnBeforeLaunch(const base::string16& dll_path) {}
// Called after the chrome.dll entry point returns and before terminating
// this process. The return value will be used as the process return code.
// |dll_path| refers to the path of the Chrome dll being loaded.
- virtual int OnBeforeExit(int return_code, const base::string16& dll_path) = 0;
+ virtual int OnBeforeExit(int return_code, const base::string16& dll_path) {
+ return return_code;
+ }
- private:
- HMODULE Load(const wchar_t* dll_name,
- base::string16* out_version,
- base::string16* out_file);
+ protected:
+ // Derived classes must return the relative registry path that holds the
+ // most current version of chrome.dll.
+ virtual base::string16 GetRegistryPath() = 0;
+
+ HMODULE Load(base::string16* out_version, base::string16* out_file);
private:
+ // Chrome.dll handle.
HMODULE dll_;
- const bool metro_mode_;
};
// Factory for the MainDllLoader. Caller owns the pointer and should call