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

Side by Side Diff: chrome/browser/ui/android/website_settings_popup_android.cc

Issue 476513002: Add UMA histogram to count hard revokes of user certificate error decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/android/website_settings_popup_android.h" 5 #include "chrome/browser/ui/android/website_settings_popup_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "chrome/browser/android/resource_mapper.h" 10 #include "chrome/browser/android/resource_mapper.h"
11 #include "chrome/browser/infobars/infobar_service.h" 11 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
14 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
15 #include "chrome/browser/ui/website_settings/website_settings.h" 13 #include "chrome/browser/ui/website_settings/website_settings.h"
16 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
17 #include "content/public/browser/browser_context.h" 15 #include "content/public/browser/browser_context.h"
18 #include "content/public/browser/cert_store.h" 16 #include "content/public/browser/cert_store.h"
19 #include "content/public/browser/navigation_controller.h" 17 #include "content/public/browser/navigation_controller.h"
20 #include "content/public/browser/navigation_entry.h" 18 #include "content/public/browser/navigation_entry.h"
21 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
22 #include "content/public/common/ssl_status.h" 20 #include "content/public/common/ssl_status.h"
23 #include "jni/WebsiteSettingsPopup_jni.h" 21 #include "jni/WebsiteSettingsPopup_jni.h"
24 #include "net/cert/x509_certificate.h" 22 #include "net/cert/x509_certificate.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {} 103 WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {}
106 104
107 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) { 105 void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) {
108 delete this; 106 delete this;
109 } 107 }
110 108
111 void WebsiteSettingsPopupAndroid::ResetCertDecisions( 109 void WebsiteSettingsPopupAndroid::ResetCertDecisions(
112 JNIEnv* env, 110 JNIEnv* env,
113 jobject obj, 111 jobject obj,
114 jobject java_web_contents) { 112 jobject java_web_contents) {
115 content::WebContents* web_contents = 113 presenter_->OnRevokeSSLErrorBypassButtonPressed();
116 content::WebContents::FromJavaWebContents(java_web_contents);
117 if (!web_contents)
118 return;
119 ChromeSSLHostStateDelegate* delegate =
120 presenter_->chrome_ssl_host_state_delegate();
121 DCHECK(delegate);
122 delegate->RevokeUserDecisionsHard(presenter_->site_url().host());
123 } 114 }
124 115
125 void WebsiteSettingsPopupAndroid::SetIdentityInfo( 116 void WebsiteSettingsPopupAndroid::SetIdentityInfo(
126 const IdentityInfo& identity_info) { 117 const IdentityInfo& identity_info) {
127 JNIEnv* env = base::android::AttachCurrentThread(); 118 JNIEnv* env = base::android::AttachCurrentThread();
128 119
129 { 120 {
130 int icon_id = ResourceMapper::MapFromChromiumId( 121 int icon_id = ResourceMapper::MapFromChromiumId(
131 WebsiteSettingsUI::GetIdentityIconID(identity_info.identity_status)); 122 WebsiteSettingsUI::GetIdentityIconID(identity_info.identity_status));
132 123
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void WebsiteSettingsPopupAndroid::SetFirstVisit( 189 void WebsiteSettingsPopupAndroid::SetFirstVisit(
199 const base::string16& first_visit) { 190 const base::string16& first_visit) {
200 NOTIMPLEMENTED(); 191 NOTIMPLEMENTED();
201 } 192 }
202 193
203 // static 194 // static
204 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid( 195 bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid(
205 JNIEnv* env) { 196 JNIEnv* env) {
206 return RegisterNativesImpl(env); 197 return RegisterNativesImpl(env);
207 } 198 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698