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

Side by Side Diff: chrome/browser/ssl/ssl_error_info.cc

Issue 9691003: Add Content API around CertStore. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix clang Created 8 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
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/ssl/ssl_error_info.h" 5 #include "chrome/browser/ssl/ssl_error_info.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/time_format.h" 9 #include "chrome/common/time_format.h"
10 #include "content/browser/cert_store.h" 10 #include "content/public/browser/cert_store.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "grit/chromium_strings.h" 12 #include "grit/chromium_strings.h"
13 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
14 #include "net/base/cert_status_flags.h" 14 #include "net/base/cert_status_flags.h"
15 #include "net/base/net_errors.h" 15 #include "net/base/net_errors.h"
16 #include "net/base/ssl_info.h" 16 #include "net/base/ssl_info.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 18
19 SSLErrorInfo::SSLErrorInfo(const string16& title, 19 SSLErrorInfo::SSLErrorInfo(const string16& title,
20 const string16& details, 20 const string16& details,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 CERT_WEAK_KEY 276 CERT_WEAK_KEY
277 }; 277 };
278 DCHECK(arraysize(kErrorFlags) == arraysize(kErrorTypes)); 278 DCHECK(arraysize(kErrorFlags) == arraysize(kErrorTypes));
279 279
280 scoped_refptr<net::X509Certificate> cert = NULL; 280 scoped_refptr<net::X509Certificate> cert = NULL;
281 int count = 0; 281 int count = 0;
282 for (size_t i = 0; i < arraysize(kErrorFlags); ++i) { 282 for (size_t i = 0; i < arraysize(kErrorFlags); ++i) {
283 if (cert_status & kErrorFlags[i]) { 283 if (cert_status & kErrorFlags[i]) {
284 count++; 284 count++;
285 if (!cert.get()) { 285 if (!cert.get()) {
286 bool r = CertStore::GetInstance()->RetrieveCert(cert_id, &cert); 286 bool r = content::CertStore::GetInstance()->RetrieveCert(
287 cert_id, &cert);
287 DCHECK(r); 288 DCHECK(r);
288 } 289 }
289 if (errors) 290 if (errors)
290 errors->push_back(SSLErrorInfo::CreateError(kErrorTypes[i], cert, url)); 291 errors->push_back(SSLErrorInfo::CreateError(kErrorTypes[i], cert, url));
291 } 292 }
292 } 293 }
293 return count; 294 return count;
294 } 295 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | chrome/browser/ui/cocoa/page_info_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698