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

Side by Side Diff: chrome/installer/gcapi/gcapi_dll.cc

Issue 11280067: Refactor SetOmahaExperimentLabel out of gcpai and into install_util. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. DLL Entry point added. Created 8 years 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
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/installer/gcapi/gcapi_omaha_experiment.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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
grt (UTC plus 2) 2012/12/20 19:45:33 #include <windows.h> for things like WINAPI, HINST
SteveT 2013/01/07 21:16:52 Done.
5 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/logging.h"
8
5 // Visual Studio needs at least one C++ file in project http://goo.gl/roro9 9 // Visual Studio needs at least one C++ file in project http://goo.gl/roro9
10
11 base::AtExitManager* g_exit_manager = NULL;
grt (UTC plus 2) 2012/12/20 19:45:33 put this in the unnamed namespace.
SteveT 2013/01/07 21:16:52 Done.
12
13 // DLL Entry Point - This is necessary to initialize basic things like the
14 // CommandLine and Logging components needed by functions in the DLL.
15 extern "C" BOOL WINAPI DllMain(HINSTANCE instance,
16 DWORD reason,
17 LPVOID reserved) {
18 if (reason == DLL_PROCESS_ATTACH) {
19 g_exit_manager = new base::AtExitManager();
20 CommandLine::Init(0, NULL);
21 logging::InitLogging(
22 NULL,
23 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
24 logging::LOCK_LOG_FILE,
25 logging::DELETE_OLD_LOG_FILE,
26 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
27 } else {
grt (UTC plus 2) 2012/12/20 19:45:33 } else if (reason == DLL_PROCESS_DETACH) { (since
SteveT 2013/01/07 21:16:52 Done. Thanks for catching this.
28 delete g_exit_manager;
grt (UTC plus 2) 2012/12/20 19:45:33 it seems prudent (although not required) to call C
SteveT 2013/01/07 21:16:52 Prudent, yes. I'll add it in. (I am guessing that
grt (UTC plus 2) 2013/01/08 04:34:06 It doesn't appear that CommandLine uses the AtExit
29 g_exit_manager = NULL;
30 }
31
32 return TRUE;
33 }
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/installer/gcapi/gcapi_omaha_experiment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698