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 #include "chrome/tools/crash_service/crash_service.h" | 5 #include "chrome/tools/crash_service/crash_service.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <fstream> | 9 #include <fstream> |
10 #include <map> | 10 #include <map> |
11 #include <sddl.h> | 11 #include <sddl.h> |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/win_util.h" | 17 #include "base/win/windows_version.h" |
18 #include "breakpad/src/client/windows/crash_generation/client_info.h" | 18 #include "breakpad/src/client/windows/crash_generation/client_info.h" |
19 #include "breakpad/src/client/windows/crash_generation/crash_generation_server.h
" | 19 #include "breakpad/src/client/windows/crash_generation/crash_generation_server.h
" |
20 #include "breakpad/src/client/windows/sender/crash_report_sender.h" | 20 #include "breakpad/src/client/windows/sender/crash_report_sender.h" |
21 #include "chrome/common/chrome_constants.h" | 21 #include "chrome/common/chrome_constants.h" |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const wchar_t kTestPipeName[] = L"\\\\.\\pipe\\ChromeCrashServices"; | 26 const wchar_t kTestPipeName[] = L"\\\\.\\pipe\\ChromeCrashServices"; |
27 | 27 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 if (!sender_) { | 206 if (!sender_) { |
207 LOG(ERROR) << "could not create sender"; | 207 LOG(ERROR) << "could not create sender"; |
208 return false; | 208 return false; |
209 } | 209 } |
210 sender_->set_max_reports_per_day(max_reports); | 210 sender_->set_max_reports_per_day(max_reports); |
211 } | 211 } |
212 | 212 |
213 SECURITY_ATTRIBUTES security_attributes = {0}; | 213 SECURITY_ATTRIBUTES security_attributes = {0}; |
214 SECURITY_ATTRIBUTES* security_attributes_actual = NULL; | 214 SECURITY_ATTRIBUTES* security_attributes_actual = NULL; |
215 | 215 |
216 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) { | 216 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { |
217 SECURITY_DESCRIPTOR* security_descriptor = | 217 SECURITY_DESCRIPTOR* security_descriptor = |
218 reinterpret_cast<SECURITY_DESCRIPTOR*>( | 218 reinterpret_cast<SECURITY_DESCRIPTOR*>( |
219 GetSecurityDescriptorForLowIntegrity()); | 219 GetSecurityDescriptorForLowIntegrity()); |
220 DCHECK(security_descriptor != NULL); | 220 DCHECK(security_descriptor != NULL); |
221 | 221 |
222 security_attributes.nLength = sizeof(security_attributes); | 222 security_attributes.nLength = sizeof(security_attributes); |
223 security_attributes.lpSecurityDescriptor = security_descriptor; | 223 security_attributes.lpSecurityDescriptor = security_descriptor; |
224 security_attributes.bInheritHandle = FALSE; | 224 security_attributes.bInheritHandle = FALSE; |
225 | 225 |
226 security_attributes_actual = &security_attributes; | 226 security_attributes_actual = &security_attributes; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 SDDL_REVISION, | 469 SDDL_REVISION, |
470 &sec_desc, NULL)) { | 470 &sec_desc, NULL)) { |
471 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl, | 471 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl, |
472 &sacl_defaulted)) { | 472 &sacl_defaulted)) { |
473 return sec_desc; | 473 return sec_desc; |
474 } | 474 } |
475 } | 475 } |
476 | 476 |
477 return NULL; | 477 return NULL; |
478 } | 478 } |
OLD | NEW |