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 // Need to include this before the ATL headers below. | 7 // Need to include this before the ATL headers below. |
8 #include "chrome_frame/chrome_tab.h" | 8 #include "chrome_frame/chrome_tab.h" |
9 | 9 |
10 #include <atlsecurity.h> | 10 #include <atlsecurity.h> |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 // The idea here is to try this out on chrome frame dev channel | 251 // The idea here is to try this out on chrome frame dev channel |
252 // and see if it produces a significant drift in startup numbers. | 252 // and see if it produces a significant drift in startup numbers. |
253 HRESULT SetupRunOnce() { | 253 HRESULT SetupRunOnce() { |
254 HRESULT result = E_FAIL; | 254 HRESULT result = E_FAIL; |
255 | 255 |
256 std::wstring channel_name; | 256 std::wstring channel_name; |
257 if (base::win::GetVersion() < base::win::VERSION_VISTA && | 257 if (base::win::GetVersion() < base::win::VERSION_VISTA && |
258 GoogleUpdateSettings::GetChromeChannelAndModifiers(true, &channel_name)) { | 258 GoogleUpdateSettings::GetChromeChannelAndModifiers(true, &channel_name)) { |
259 std::transform(channel_name.begin(), channel_name.end(), | 259 std::transform(channel_name.begin(), channel_name.end(), |
260 channel_name.begin(), tolower); | 260 channel_name.begin(), tolower); |
261 // Use this only for the dev channel and CEEE channels. | 261 // Use this only for the dev channel channel. |
Jói
2011/12/16 11:11:44
channel channel -> channel
Roger Tawa OOO till Jul 10th
2011/12/16 16:24:30
Done.
| |
262 if (channel_name.find(L"dev") != std::wstring::npos || | 262 if (channel_name.find(L"dev") != std::wstring::npos) { |
263 channel_name.find(L"ceee") != std::wstring::npos) { | |
264 HKEY hive = HKEY_CURRENT_USER; | 263 HKEY hive = HKEY_CURRENT_USER; |
265 if (IsSystemProcess()) { | 264 if (IsSystemProcess()) { |
266 // For system installs, our updates will be running as SYSTEM which | 265 // For system installs, our updates will be running as SYSTEM which |
267 // makes writing to a RunOnce key under HKCU not so terribly useful. | 266 // makes writing to a RunOnce key under HKCU not so terribly useful. |
268 hive = HKEY_LOCAL_MACHINE; | 267 hive = HKEY_LOCAL_MACHINE; |
269 } | 268 } |
270 | 269 |
271 RegKey run_once; | 270 RegKey run_once; |
272 LONG ret = run_once.Create(hive, kRunOnce, KEY_READ | KEY_WRITE); | 271 LONG ret = run_once.Create(hive, kRunOnce, KEY_READ | KEY_WRITE); |
273 if (ret == ERROR_SUCCESS) { | 272 if (ret == ERROR_SUCCESS) { |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
919 HRESULT hr = CustomRegistration(ALL, FALSE, false); | 918 HRESULT hr = CustomRegistration(ALL, FALSE, false); |
920 return hr; | 919 return hr; |
921 } | 920 } |
922 | 921 |
923 // Object entries go here instead of with each object, so that we can move | 922 // Object entries go here instead of with each object, so that we can move |
924 // the objects to a lib. Also reduces magic. | 923 // the objects to a lib. Also reduces magic. |
925 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) | 924 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) |
926 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) | 925 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) |
927 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) | 926 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) |
928 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) | 927 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) |
OLD | NEW |