Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: chrome/app/google_update_client.h

Issue 10300: Implement the load chrome.dll before file version for Google Chrome builds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_exe_main.cc ('k') | chrome/app/google_update_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This is the Chrome-GoogleUpdater integration glue. Current features of this 5 // This is the Chrome-GoogleUpdater integration glue. Current features of this
6 // code include: 6 // code include:
7 // * checks to ensure that client is properly registered with GoogleUpdater 7 // * checks to ensure that client is properly registered with GoogleUpdater
8 // * versioned directory launcher to allow for completely transparent silent 8 // * versioned directory launcher to allow for completely transparent silent
9 // autoupdates 9 // autoupdates
10 10
(...skipping 23 matching lines...) Expand all
34 // if Init() was unable to obtain one. 34 // if Init() was unable to obtain one.
35 const wchar_t* GetVersion() const; 35 const wchar_t* GetVersion() const;
36 36
37 // Init must be called prior to other methods. 37 // Init must be called prior to other methods.
38 // client_guid is the guid that you registered with Google Update when you 38 // client_guid is the guid that you registered with Google Update when you
39 // installed. 39 // installed.
40 // Returns false if client is not properly registered with GoogleUpdate. If 40 // Returns false if client is not properly registered with GoogleUpdate. If
41 // not registered, autoupdates won't be performed for this client. 41 // not registered, autoupdates won't be performed for this client.
42 bool Init(const wchar_t* client_guid, const wchar_t* client_dll); 42 bool Init(const wchar_t* client_guid, const wchar_t* client_dll);
43 43
44 // Load the application's main DLL.
45 // - looks up the registered version via GoogleUpdate, loads dll from version
46 // dir (e.g. Program Files/Google/1.0.101.0/chrome.dll). If chrome.dll is
47 // found in this path the version is stored in the environment block such
48 // that subsequent launches invoke the same dll version.
49 bool Load();
50
44 // Launches your app's main code and initializes Google Update services. 51 // Launches your app's main code and initializes Google Update services.
45 // - looks up the registered version via GoogleUpdate, loads dll from version 52 // - Calls the entry_name function of your application's DLL.
46 // dir (e.g. Program Files/Google/1.0.101.0/chrome.dll) and calls the
47 // entry_name. If chrome.dll is found in this path the version is stored
48 // in the environment block such that subsequent launches invoke the
49 // save dll version.
50 // - instance is handle to the current instance of application 53 // - instance is handle to the current instance of application
51 // - sandbox provides information about sandbox services 54 // - sandbox provides information about sandbox services
52 // - command_line contains command line parameters 55 // - command_line contains command line parameters
53 // - show_command specifies how the window is to be shown 56 // - show_command specifies how the window is to be shown
54 // - entry_name is the function of type DLL_MAIN that is called 57 // - entry_name is the function of type DLL_MAIN that is called
55 // from chrome.dll 58 // from chrome.dll
56 // - ret is an out param with the return value of entry 59 // - ret is an out param with the return value of entry
57 // Returns false if unable to load the dll or find entry_name's proc addr. 60 // Returns false if unable to load the dll or find entry_name's proc addr.
58 bool Launch(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox, 61 bool Launch(HINSTANCE instance, sandbox::SandboxInterfaceInfo* sandbox,
59 wchar_t* command_line, int show_command, const char* entry_name, 62 wchar_t* command_line, int show_command, const char* entry_name,
60 int* ret); 63 int* ret);
61 64
62 private: 65 private:
63 // disallow copy ctor and operator= 66 // disallow copy ctor and operator=
64 GoogleUpdateClient(const GoogleUpdateClient&); 67 GoogleUpdateClient(const GoogleUpdateClient&);
65 void operator=(const GoogleUpdateClient&); 68 void operator=(const GoogleUpdateClient&);
66 69
67 // The GUID that this client has registered with GoogleUpdate for autoupdate. 70 // The GUID that this client has registered with GoogleUpdate for autoupdate.
68 std::wstring guid_; 71 std::wstring guid_;
69 // The name of the dll to load. 72 // The name of the dll to load.
70 std::wstring dll_; 73 std::wstring dll_;
74 // The handle to dll_ after it has been loaded.
75 HINSTANCE dll_handle_;
71 // The current version of this client registered with GoogleUpdate. 76 // The current version of this client registered with GoogleUpdate.
72 wchar_t* version_; 77 wchar_t* version_;
73 // The location of current chrome.dll. 78 // The location of current chrome.dll.
74 wchar_t dll_path_[MAX_PATH]; 79 wchar_t dll_path_[MAX_PATH];
75 }; 80 };
76 81
77 } // namespace google_update 82 } // namespace google_update
78 83
79 #endif // CHROME_APP_GOOGLE_UPDATE_CLIENT_H_ 84 #endif // CHROME_APP_GOOGLE_UPDATE_CLIENT_H_
80 85
OLDNEW
« no previous file with comments | « chrome/app/chrome_exe_main.cc ('k') | chrome/app/google_update_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698