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

Side by Side Diff: chrome/browser/enumerate_modules_model_win.cc

Issue 368133005: Fixes for re-enabling more MSVC level 4 warnings: chrome/browser/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment Created 6 years, 5 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
OLDNEW
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 "chrome/browser/enumerate_modules_model_win.h" 5 #include "chrome/browser/enumerate_modules_model_win.h"
6 6
7 #include <Tlhelp32.h> 7 #include <Tlhelp32.h>
8 #include <wintrust.h> 8 #include <wintrust.h>
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 store, 773 store,
774 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 774 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
775 0, 775 0,
776 CERT_FIND_SUBJECT_CERT, 776 CERT_FIND_SUBJECT_CERT,
777 &CertInfo, 777 &CertInfo,
778 NULL); 778 NULL);
779 if (!cert_context) 779 if (!cert_context)
780 return base::string16(); 780 return base::string16();
781 781
782 // Determine the size of the Subject name. 782 // Determine the size of the Subject name.
783 DWORD subject_name_size = 0; 783 DWORD subject_name_size = CertGetNameString(
784 if (!(subject_name_size = CertGetNameString(cert_context, 784 cert_context, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, NULL, 0);
785 CERT_NAME_SIMPLE_DISPLAY_TYPE, 785 if (!subject_name_size)
786 0,
787 NULL,
788 NULL,
789 0))) {
790 return base::string16(); 786 return base::string16();
791 }
792 787
793 base::string16 subject_name; 788 base::string16 subject_name;
794 subject_name.resize(subject_name_size); 789 subject_name.resize(subject_name_size);
795 790
796 // Get subject name. 791 // Get subject name.
797 if (!(CertGetNameString(cert_context, 792 if (!(CertGetNameString(cert_context,
798 CERT_NAME_SIMPLE_DISPLAY_TYPE, 793 CERT_NAME_SIMPLE_DISPLAY_TYPE,
799 0, 794 0,
800 NULL, 795 NULL,
801 const_cast<LPWSTR>(subject_name.c_str()), 796 const_cast<LPWSTR>(subject_name.c_str()),
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 GenerateHash(base::WideToUTF8(module.location), &location); 1037 GenerateHash(base::WideToUTF8(module.location), &location);
1043 GenerateHash(base::WideToUTF8(module.description), &description); 1038 GenerateHash(base::WideToUTF8(module.description), &description);
1044 GenerateHash(base::WideToUTF8(module.digital_signer), &signer); 1039 GenerateHash(base::WideToUTF8(module.digital_signer), &signer);
1045 1040
1046 base::string16 url = 1041 base::string16 url =
1047 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, 1042 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS,
1048 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), 1043 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location),
1049 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); 1044 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer));
1050 return GURL(base::UTF16ToUTF8(url)); 1045 return GURL(base::UTF16ToUTF8(url));
1051 } 1046 }
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/sw_reporter_installer_win.cc ('k') | chrome/browser/extensions/activity_log/uma_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698