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

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

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on Android Created 6 years 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
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_add_certificate.h" 5 #include "chrome/browser/ssl/ssl_add_certificate.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/certificate_viewer.h" 10 #include "chrome/browser/certificate_viewer.h"
(...skipping 17 matching lines...) Expand all
28 28
29 namespace chrome { 29 namespace chrome {
30 30
31 namespace { 31 namespace {
32 32
33 class SSLAddCertificateInfoBarDelegate : public ConfirmInfoBarDelegate { 33 class SSLAddCertificateInfoBarDelegate : public ConfirmInfoBarDelegate {
34 public: 34 public:
35 // Creates an SSL certificate enrollment result infobar and delegate. 35 // Creates an SSL certificate enrollment result infobar and delegate.
36 static void Create(InfoBarService* infobar_service, 36 static void Create(InfoBarService* infobar_service,
37 net::X509Certificate* cert) { 37 net::X509Certificate* cert) {
38 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( 38 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
39 scoped_ptr<ConfirmInfoBarDelegate>( 39 scoped_ptr<ConfirmInfoBarDelegate>(
40 new SSLAddCertificateInfoBarDelegate(cert)))); 40 new SSLAddCertificateInfoBarDelegate(cert))));
41 } 41 }
42 42
43 private: 43 private:
44 explicit SSLAddCertificateInfoBarDelegate(net::X509Certificate* cert) 44 explicit SSLAddCertificateInfoBarDelegate(net::X509Certificate* cert)
45 : cert_(cert) {} 45 : cert_(cert) {}
46 ~SSLAddCertificateInfoBarDelegate() override {} 46 ~SSLAddCertificateInfoBarDelegate() override {}
47 47
48 // ConfirmInfoBarDelegate implementation: 48 // ConfirmInfoBarDelegate implementation:
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 render_process_id, render_frame_id, cert_error)); 163 render_process_id, render_frame_id, cert_error));
164 } else { 164 } else {
165 BrowserThread::PostTask( 165 BrowserThread::PostTask(
166 BrowserThread::UI, FROM_HERE, 166 BrowserThread::UI, FROM_HERE,
167 base::Bind(&ShowSuccessInfoBar, 167 base::Bind(&ShowSuccessInfoBar,
168 render_process_id, render_frame_id, cert)); 168 render_process_id, render_frame_id, cert));
169 } 169 }
170 } 170 }
171 171
172 } // namespace chrome 172 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_observer.cc ('k') | chrome/browser/supervised_user/supervised_user_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698