| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 } | 323 } |
| 324 | 324 |
| 325 RegKey run_once; | 325 RegKey run_once; |
| 326 LONG ret = run_once.Create(hive, kRunOnce, KEY_READ | KEY_WRITE); | 326 LONG ret = run_once.Create(hive, kRunOnce, KEY_READ | KEY_WRITE); |
| 327 if (ret == ERROR_SUCCESS) { | 327 if (ret == ERROR_SUCCESS) { |
| 328 CommandLine run_once_cmd(chrome_launcher::GetChromeExecutablePath()); | 328 CommandLine run_once_cmd(chrome_launcher::GetChromeExecutablePath()); |
| 329 run_once_cmd.AppendSwitchASCII(switches::kAutomationClientChannelID, | 329 run_once_cmd.AppendSwitchASCII(switches::kAutomationClientChannelID, |
| 330 "0"); | 330 "0"); |
| 331 run_once_cmd.AppendSwitch(switches::kChromeFrame); | 331 run_once_cmd.AppendSwitch(switches::kChromeFrame); |
| 332 ret = run_once.WriteValue(L"A", | 332 ret = run_once.WriteValue(L"A", |
| 333 run_once_cmd.command_line_string().c_str()); | 333 run_once_cmd.GetCommandLineString().c_str()); |
| 334 } | 334 } |
| 335 result = HRESULT_FROM_WIN32(ret); | 335 result = HRESULT_FROM_WIN32(ret); |
| 336 } else { | 336 } else { |
| 337 result = S_FALSE; | 337 result = S_FALSE; |
| 338 } | 338 } |
| 339 } else { | 339 } else { |
| 340 // We're on a non-XP version of Windows or on a stable channel. Nothing | 340 // We're on a non-XP version of Windows or on a stable channel. Nothing |
| 341 // needs doing. | 341 // needs doing. |
| 342 result = S_FALSE; | 342 result = S_FALSE; |
| 343 } | 343 } |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 sd.GetDacl(&new_dacl); | 804 sd.GetDacl(&new_dacl); |
| 805 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); | 805 new_dacl.AddAllowedAce(token_.GetUser(), GENERIC_WRITE | GENERIC_READ); |
| 806 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { | 806 if (AtlSetDacl(object_name.c_str(), SE_REGISTRY_KEY, new_dacl)) { |
| 807 result = SetOrDeleteMimeHandlerKey(enable, HKEY_LOCAL_MACHINE); | 807 result = SetOrDeleteMimeHandlerKey(enable, HKEY_LOCAL_MACHINE); |
| 808 } | 808 } |
| 809 } | 809 } |
| 810 | 810 |
| 811 backup.RestoreSecurity(object_name.c_str()); | 811 backup.RestoreSecurity(object_name.c_str()); |
| 812 return result; | 812 return result; |
| 813 } | 813 } |
| OLD | NEW |