Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: chrome/tools/crash_service/crash_service.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/url_fetch_test/url_fetch_test.cc ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 22 matching lines...) Expand all
33 bool CustomInfoToMap(const google_breakpad::ClientInfo* client_info, 33 bool CustomInfoToMap(const google_breakpad::ClientInfo* client_info,
34 const std::wstring& reporter_tag, CrashMap* map) { 34 const std::wstring& reporter_tag, CrashMap* map) {
35 google_breakpad::CustomClientInfo info = client_info->GetCustomInfo(); 35 google_breakpad::CustomClientInfo info = client_info->GetCustomInfo();
36 36
37 for (uintptr_t i = 0; i < info.count; ++i) { 37 for (uintptr_t i = 0; i < info.count; ++i) {
38 (*map)[info.entries[i].name] = info.entries[i].value; 38 (*map)[info.entries[i].name] = info.entries[i].value;
39 } 39 }
40 40
41 (*map)[L"rept"] = reporter_tag; 41 (*map)[L"rept"] = reporter_tag;
42 42
43 return (map->size() > 0); 43 return !map->empty();
44 } 44 }
45 45
46 bool WriteCustomInfoToFile(const std::wstring& dump_path, const CrashMap& map) { 46 bool WriteCustomInfoToFile(const std::wstring& dump_path, const CrashMap& map) {
47 std::wstring file_path(dump_path); 47 std::wstring file_path(dump_path);
48 size_t last_dot = file_path.rfind(L'.'); 48 size_t last_dot = file_path.rfind(L'.');
49 if (last_dot == std::wstring::npos) 49 if (last_dot == std::wstring::npos)
50 return false; 50 return false;
51 file_path.resize(last_dot); 51 file_path.resize(last_dot);
52 file_path += L".txt"; 52 file_path += L".txt";
53 53
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 SDDL_REVISION, 470 SDDL_REVISION,
471 &sec_desc, NULL)) { 471 &sec_desc, NULL)) {
472 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl, 472 if (::GetSecurityDescriptorSacl(sec_desc, &sacl_present, &sacl,
473 &sacl_defaulted)) { 473 &sacl_defaulted)) {
474 return sec_desc; 474 return sec_desc;
475 } 475 }
476 } 476 }
477 477
478 return NULL; 478 return NULL;
479 } 479 }
OLDNEW
« no previous file with comments | « chrome/test/url_fetch_test/url_fetch_test.cc ('k') | chrome_frame/chrome_frame_automation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698