| OLD | NEW |
| (Empty) |
| 1 // Copyright 2008-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 #include "omaha/tools/goopdump/data_dumper_oneclick.h" | |
| 17 | |
| 18 #include "omaha/common/reg_key.h" | |
| 19 #include "omaha/tools/goopdump/dump_log.h" | |
| 20 #include "omaha/tools/goopdump/goopdump_cmd_line_parser.h" | |
| 21 | |
| 22 namespace omaha { | |
| 23 | |
| 24 DataDumperOneClick::DataDumperOneClick() { | |
| 25 } | |
| 26 | |
| 27 DataDumperOneClick::~DataDumperOneClick() { | |
| 28 } | |
| 29 | |
| 30 void DataDumperOneClick::DumpOneClickDataForVersion(const DumpLog& dump_log, | |
| 31 int plugin_version) { | |
| 32 | |
| 33 dump_log.WriteLine(_T("Trying Plugin Version: %d"), plugin_version); | |
| 34 | |
| 35 CString oneclick_name; | |
| 36 oneclick_name.Format(_T("Google.OneClickCtrl.%d"), plugin_version); | |
| 37 | |
| 38 CString reg_str; | |
| 39 reg_str.Format(_T("HKCR\\%s"), oneclick_name); | |
| 40 DumpRegValueStr(dump_log, reg_str, NULL); | |
| 41 | |
| 42 CString clsid; | |
| 43 reg_str.Append(_T("\\CLSID")); | |
| 44 DumpRegValueStrRet(dump_log, reg_str, NULL, &clsid); | |
| 45 | |
| 46 reg_str.Format(_T("HKCR\\MIME\\DataBase\\Content Type\\application/%s"), | |
| 47 oneclick_name); | |
| 48 DumpRegValueStr(dump_log, reg_str, _T("CLSID")); | |
| 49 | |
| 50 CString key; | |
| 51 key.Format(_T("HKCR\\CLSID\\%s"), clsid); | |
| 52 | |
| 53 if (!clsid.IsEmpty()) { | |
| 54 DumpRegistryKeyData(dump_log, key); | |
| 55 } | |
| 56 | |
| 57 CString typelib; | |
| 58 CString key2 = key; | |
| 59 key2.Append(_T("\\TypeLib")); | |
| 60 if (SUCCEEDED(RegKey::GetValue(key2, NULL, &typelib))) { | |
| 61 if (!typelib.IsEmpty()) { | |
| 62 key.Format(_T("HKCR\\Typelib\\%s\\1.0\\0\\win32"), typelib); | |
| 63 DumpRegistryKeyData(dump_log, key); | |
| 64 } | |
| 65 } | |
| 66 | |
| 67 dump_log.WriteLine(_T("")); | |
| 68 } | |
| 69 | |
| 70 HRESULT DataDumperOneClick::Process(const DumpLog& dump_log, | |
| 71 const GoopdumpCmdLineArgs& args) { | |
| 72 UNREFERENCED_PARAMETER(args); | |
| 73 | |
| 74 DumpHeader header(dump_log, _T("OneClick Data")); | |
| 75 | |
| 76 CString activex_version_str(ACTIVEX_VERSION_ANSI); | |
| 77 int activex_version = _ttoi(activex_version_str); | |
| 78 | |
| 79 for (int i = 1; i <= activex_version; ++i) { | |
| 80 DumpOneClickDataForVersion(dump_log, i); | |
| 81 } | |
| 82 | |
| 83 return S_OK; | |
| 84 } | |
| 85 | |
| 86 } // namespace omaha | |
| 87 | |
| OLD | NEW |