| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // chrome_tab.cc : Implementation of DLL Exports. | 5 // chrome_tab.cc : Implementation of DLL Exports. |
| 6 | 6 |
| 7 // Include without path to make GYP build see it. | 7 // Include without path to make GYP build see it. |
| 8 #include "chrome_tab.h" // NOLINT | 8 #include "chrome_tab.h" // NOLINT |
| 9 | 9 |
| 10 #include <atlsecurity.h> | 10 #include <atlsecurity.h> |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 RegKey ua_key; | 369 RegKey ua_key; |
| 370 LONG reg_result = ua_key.Create(parent_hive, kPostPlatformUAKey, | 370 LONG reg_result = ua_key.Create(parent_hive, kPostPlatformUAKey, |
| 371 KEY_READ | KEY_WRITE); | 371 KEY_READ | KEY_WRITE); |
| 372 if (reg_result == ERROR_SUCCESS) { | 372 if (reg_result == ERROR_SUCCESS) { |
| 373 // Make sure that we unregister ChromeFrame UA strings registered previously | 373 // Make sure that we unregister ChromeFrame UA strings registered previously |
| 374 wchar_t value_name[MAX_PATH + 1] = {}; | 374 wchar_t value_name[MAX_PATH + 1] = {}; |
| 375 wchar_t value_data[MAX_PATH + 1] = {}; | 375 wchar_t value_data[MAX_PATH + 1] = {}; |
| 376 | 376 |
| 377 DWORD value_index = 0; | 377 DWORD value_index = 0; |
| 378 while (value_index < ua_key.ValueCount()) { | 378 while (value_index < ua_key.GetValueCount()) { |
| 379 DWORD name_size = arraysize(value_name); | 379 DWORD name_size = arraysize(value_name); |
| 380 DWORD value_size = arraysize(value_data); | 380 DWORD value_size = arraysize(value_data); |
| 381 DWORD type = 0; | 381 DWORD type = 0; |
| 382 LRESULT ret = ::RegEnumValue(ua_key.Handle(), value_index, value_name, | 382 LRESULT ret = ::RegEnumValue(ua_key.Handle(), value_index, value_name, |
| 383 &name_size, NULL, &type, | 383 &name_size, NULL, &type, |
| 384 reinterpret_cast<BYTE*>(value_data), | 384 reinterpret_cast<BYTE*>(value_data), |
| 385 &value_size); | 385 &value_size); |
| 386 if (ret == ERROR_SUCCESS) { | 386 if (ret == ERROR_SUCCESS) { |
| 387 if (StartsWith(value_name, kChromeFramePrefix, false)) { | 387 if (StartsWith(value_name, kChromeFramePrefix, false)) { |
| 388 ua_key.DeleteValue(value_name); | 388 ua_key.DeleteValue(value_name); |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 HRESULT hr = CustomRegistration(ALL, FALSE, false); | 916 HRESULT hr = CustomRegistration(ALL, FALSE, false); |
| 917 return hr; | 917 return hr; |
| 918 } | 918 } |
| 919 | 919 |
| 920 // Object entries go here instead of with each object, so that we can move | 920 // Object entries go here instead of with each object, so that we can move |
| 921 // the objects to a lib. Also reduces magic. | 921 // the objects to a lib. Also reduces magic. |
| 922 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) | 922 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) |
| 923 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) | 923 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) |
| 924 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) | 924 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) |
| 925 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) | 925 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) |
| OLD | NEW |