OLD | NEW |
| (Empty) |
1 // Copyright 2009 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 #ifndef OMAHA_TOOLS_SRC_GOOPDUMP_GOOPDUMP_H__ | |
17 #define OMAHA_TOOLS_SRC_GOOPDUMP_GOOPDUMP_H__ | |
18 | |
19 #include <windows.h> | |
20 #include <atlstr.h> | |
21 #include "base/basictypes.h" | |
22 | |
23 #include "omaha/tools/goopdump/dump_log.h" | |
24 #include "omaha/tools/goopdump/goopdump_cmd_line_parser.h" | |
25 | |
26 namespace omaha { | |
27 | |
28 class ConfigManager; | |
29 | |
30 class Goopdump { | |
31 public: | |
32 // Constructor / Destructor | |
33 Goopdump(); | |
34 ~Goopdump(); | |
35 | |
36 HRESULT Main(const TCHAR* cmd_line, int argc, TCHAR** argv); | |
37 | |
38 ConfigManager* config_manager() const; | |
39 CString cmd_line() const; | |
40 | |
41 GoopdumpCmdLineArgs& cmd_line_args() const; | |
42 | |
43 private: | |
44 // Installs a user function that is to be called when operator new fails | |
45 // to allocate memory. | |
46 static void SetNewHandler(); | |
47 | |
48 // Called by operator new or operator new[] when they cannot satisfy | |
49 // a request for additional storage. | |
50 static void OutOfMemoryHandler(); | |
51 | |
52 void PrintProgramHeader(); | |
53 void PrintUsage(); | |
54 | |
55 CString cmd_line_; // Command line, as provided by the OS. | |
56 GoopdumpCmdLineArgs args_; | |
57 DumpLog dump_log_; | |
58 | |
59 DISALLOW_EVIL_CONSTRUCTORS(Goopdump); | |
60 }; | |
61 | |
62 } // namespace omaha | |
63 | |
64 #endif // OMAHA_TOOLS_SRC_GOOPDUMP_GOOPDUMP_H__ | |
65 | |
OLD | NEW |