OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/breakpad/tools/crash_service.h" | 5 #include "components/breakpad/tools/crash_service.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <sddl.h> | 9 #include <sddl.h> |
10 #include <fstream> | 10 #include <fstream> |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } | 341 } |
342 | 342 |
343 CrashMap map; | 343 CrashMap map; |
344 CustomInfoToMap(client_info, self->reporter_tag_, &map); | 344 CustomInfoToMap(client_info, self->reporter_tag_, &map); |
345 | 345 |
346 // Move dump file to the directory under client breakpad dump location. | 346 // Move dump file to the directory under client breakpad dump location. |
347 base::FilePath dump_location = base::FilePath(*file_path); | 347 base::FilePath dump_location = base::FilePath(*file_path); |
348 CrashMap::const_iterator it = map.find(L"breakpad-dump-location"); | 348 CrashMap::const_iterator it = map.find(L"breakpad-dump-location"); |
349 if (it != map.end()) { | 349 if (it != map.end()) { |
350 base::FilePath alternate_dump_location = base::FilePath(it->second); | 350 base::FilePath alternate_dump_location = base::FilePath(it->second); |
351 file_util::CreateDirectoryW(alternate_dump_location); | 351 base::CreateDirectoryW(alternate_dump_location); |
352 alternate_dump_location = alternate_dump_location.Append( | 352 alternate_dump_location = alternate_dump_location.Append( |
353 dump_location.BaseName()); | 353 dump_location.BaseName()); |
354 base::Move(dump_location, alternate_dump_location); | 354 base::Move(dump_location, alternate_dump_location); |
355 dump_location = alternate_dump_location; | 355 dump_location = alternate_dump_location; |
356 } | 356 } |
357 | 357 |
358 DWORD pid = client_info->pid(); | 358 DWORD pid = client_info->pid(); |
359 VLOG(1) << "dump for pid = " << pid << " is " << dump_location.value(); | 359 VLOG(1) << "dump for pid = " << pid << " is " << dump_location.value(); |
360 | 360 |
361 if (!WriteCustomInfoToFile(dump_location.value(), map)) { | 361 if (!WriteCustomInfoToFile(dump_location.value(), map)) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl, | 479 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl, |
480 &sacl_defaulted)) { | 480 &sacl_defaulted)) { |
481 return sec_desc; | 481 return sec_desc; |
482 } | 482 } |
483 } | 483 } |
484 | 484 |
485 return NULL; | 485 return NULL; |
486 } | 486 } |
487 | 487 |
488 } // namespace breakpad | 488 } // namespace breakpad |
OLD | NEW |