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

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

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 years, 4 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(), 103 owner()->GetWebContents(),
104 owner()->web_contents()->GetView()->GetTopLevelNativeWindow(), 104 owner()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
105 cert_); 105 cert_);
106 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.
107 } 107 }
108 108
109 } // namespace 109 } // namespace
110 110
111 111
112 // TabContentsSSLHelper::SSLAddCertData --------------------------------------- 112 // TabContentsSSLHelper::SSLAddCertData ---------------------------------------
113 113
114 class TabContentsSSLHelper::SSLAddCertData 114 class TabContentsSSLHelper::SSLAddCertData
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 TabContentsSSLHelper::SSLAddCertData* TabContentsSSLHelper::GetAddCertData( 243 TabContentsSSLHelper::SSLAddCertData* TabContentsSSLHelper::GetAddCertData(
244 SSLAddCertHandler* handler) { 244 SSLAddCertHandler* handler) {
245 // Find/create the slot. 245 // Find/create the slot.
246 linked_ptr<SSLAddCertData>& ptr_ref = 246 linked_ptr<SSLAddCertData>& ptr_ref =
247 request_id_to_add_cert_data_[handler->network_request_id()]; 247 request_id_to_add_cert_data_[handler->network_request_id()];
248 // Fill it if necessary. 248 // Fill it if necessary.
249 if (!ptr_ref.get()) 249 if (!ptr_ref.get())
250 ptr_ref.reset(new SSLAddCertData(tab_contents_)); 250 ptr_ref.reset(new SSLAddCertData(tab_contents_));
251 return ptr_ref.get(); 251 return ptr_ref.get();
252 } 252 }
OLDNEW
« no previous file with comments | « chrome/browser/plugin_infobar_delegates.cc ('k') | chrome/browser/task_manager/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698