| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 std::wstring channel_name; | 274 std::wstring channel_name; |
| 275 if (!GoogleUpdateSettings::GetChromeChannel(true, &channel_name) || | 275 if (!GoogleUpdateSettings::GetChromeChannel(true, &channel_name) || |
| 276 (0 != lstrcmpiW(L"dev", channel_name.c_str()))) { | 276 (0 != lstrcmpiW(L"dev", channel_name.c_str()))) { |
| 277 return S_OK; | 277 return S_OK; |
| 278 } | 278 } |
| 279 | 279 |
| 280 RegKey run_once; | 280 RegKey run_once; |
| 281 if (run_once.Create(HKEY_CURRENT_USER, kRunOnce, KEY_READ | KEY_WRITE)) { | 281 if (run_once.Create(HKEY_CURRENT_USER, kRunOnce, KEY_READ | KEY_WRITE)) { |
| 282 CommandLine run_once_command(chrome_launcher::GetChromeExecutablePath()); | 282 CommandLine run_once_command(chrome_launcher::GetChromeExecutablePath()); |
| 283 run_once_command.AppendSwitchWithValue( | 283 run_once_command.AppendSwitchASCII(switches::kAutomationClientChannelID, |
| 284 switches::kAutomationClientChannelID, "0"); | 284 "0"); |
| 285 run_once_command.AppendSwitch(switches::kChromeFrame); | 285 run_once_command.AppendSwitch(switches::kChromeFrame); |
| 286 run_once.WriteValue(L"A", run_once_command.command_line_string().c_str()); | 286 run_once.WriteValue(L"A", run_once_command.command_line_string().c_str()); |
| 287 } | 287 } |
| 288 | 288 |
| 289 return S_OK; | 289 return S_OK; |
| 290 } | 290 } |
| 291 | 291 |
| 292 // Used to determine whether the DLL can be unloaded by OLE | 292 // Used to determine whether the DLL can be unloaded by OLE |
| 293 STDAPI DllCanUnloadNow() { | 293 STDAPI DllCanUnloadNow() { |
| 294 return _AtlModule.DllCanUnloadNow(); | 294 return _AtlModule.DllCanUnloadNow(); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 sd.GetDacl(&new_dacl); | 593 sd.GetDacl(&new_dacl); |
| 594 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); | 594 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); |
| 595 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { | 595 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { |
| 596 result = SetOrDeleteMimeHandlerKey(enable); | 596 result = SetOrDeleteMimeHandlerKey(enable); |
| 597 } | 597 } |
| 598 } | 598 } |
| 599 | 599 |
| 600 backup.RestoreSecurity(object_name.c_str()); | 600 backup.RestoreSecurity(object_name.c_str()); |
| 601 return result; | 601 return result; |
| 602 } | 602 } |
| OLD | NEW |