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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_ssl_helper.cc

Issue 10554010: Remove BrowserList::GetLastActive usage from WebUI pages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 6 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/tab_contents/tab_contents_ssl_helper.h" 5 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 string16 SSLCertAddedInfoBarDelegate::GetButtonLabel( 95 string16 SSLCertAddedInfoBarDelegate::GetButtonLabel(
96 InfoBarButton button) const { 96 InfoBarButton button) const {
97 DCHECK_EQ(BUTTON_OK, button); 97 DCHECK_EQ(BUTTON_OK, button);
98 return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON); 98 return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON);
99 } 99 }
100 100
101 bool SSLCertAddedInfoBarDelegate::Accept() { 101 bool SSLCertAddedInfoBarDelegate::Accept() {
102 ShowCertificateViewer( 102 ShowCertificateViewer(
103 owner()->web_contents()->GetView()->GetTopLevelNativeWindow(), cert_); 103 owner()->web_contents(),
104 owner()->web_contents()->GetView()->GetTopLevelNativeWindow(),
105 cert_);
104 return false; // Hiding the infobar just as the dialog opens looks weird. 106 return false; // Hiding the infobar just as the dialog opens looks weird.
105 } 107 }
106 108
107 } // namespace 109 } // namespace
108 110
109 111
110 // TabContentsSSLHelper::SSLAddCertData --------------------------------------- 112 // TabContentsSSLHelper::SSLAddCertData ---------------------------------------
111 113
112 class TabContentsSSLHelper::SSLAddCertData 114 class TabContentsSSLHelper::SSLAddCertData
113 : public content::NotificationObserver { 115 : public content::NotificationObserver {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 TabContentsSSLHelper::SSLAddCertData* TabContentsSSLHelper::GetAddCertData( 243 TabContentsSSLHelper::SSLAddCertData* TabContentsSSLHelper::GetAddCertData(
242 SSLAddCertHandler* handler) { 244 SSLAddCertHandler* handler) {
243 // Find/create the slot. 245 // Find/create the slot.
244 linked_ptr<SSLAddCertData>& ptr_ref = 246 linked_ptr<SSLAddCertData>& ptr_ref =
245 request_id_to_add_cert_data_[handler->network_request_id()]; 247 request_id_to_add_cert_data_[handler->network_request_id()];
246 // Fill it if necessary. 248 // Fill it if necessary.
247 if (!ptr_ref.get()) 249 if (!ptr_ref.get())
248 ptr_ref.reset(new SSLAddCertData(tab_contents_)); 250 ptr_ref.reset(new SSLAddCertData(tab_contents_));
249 return ptr_ref.get(); 251 return ptr_ref.get();
250 } 252 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.cc ('k') | chrome/browser/ui/android/certificate_viewer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698