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

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

Issue 1314953009: Refactor WebsiteSettings to operate on a SecurityInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/connection_info_popup_android.h" 5 #include "chrome/browser/ui/android/connection_info_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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 jobject java_website_settings_pop, 83 jobject java_website_settings_pop,
84 WebContents* web_contents) { 84 WebContents* web_contents) {
85 // Important to use GetVisibleEntry to match what's showing in the omnibox. 85 // Important to use GetVisibleEntry to match what's showing in the omnibox.
86 content::NavigationEntry* nav_entry = 86 content::NavigationEntry* nav_entry =
87 web_contents->GetController().GetVisibleEntry(); 87 web_contents->GetController().GetVisibleEntry();
88 if (nav_entry == NULL) 88 if (nav_entry == NULL)
89 return; 89 return;
90 90
91 popup_jobject_.Reset(env, java_website_settings_pop); 91 popup_jobject_.Reset(env, java_website_settings_pop);
92 92
93 SecurityStateModel* security_model =
94 SecurityStateModel::FromWebContents(web_contents);
95 DCHECK(security_model);
96
93 presenter_.reset(new WebsiteSettings( 97 presenter_.reset(new WebsiteSettings(
94 this, 98 this, Profile::FromBrowserContext(web_contents->GetBrowserContext()),
95 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 99 TabSpecificContentSettings::FromWebContents(web_contents), web_contents,
96 TabSpecificContentSettings::FromWebContents(web_contents), 100 nav_entry->GetURL(), security_model->GetSecurityInfo(),
97 web_contents,
98 nav_entry->GetURL(),
99 nav_entry->GetSSL(),
100 content::CertStore::GetInstance())); 101 content::CertStore::GetInstance()));
101 } 102 }
102 103
103 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() { 104 ConnectionInfoPopupAndroid::~ConnectionInfoPopupAndroid() {
104 } 105 }
105 106
106 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, jobject obj) { 107 void ConnectionInfoPopupAndroid::Destroy(JNIEnv* env, jobject obj) {
107 delete this; 108 delete this;
108 } 109 }
109 110
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // There's no tab UI on Android - only connection info is shown. 189 // There's no tab UI on Android - only connection info is shown.
189 NOTIMPLEMENTED(); 190 NOTIMPLEMENTED();
190 } 191 }
191 192
192 // static 193 // static
193 bool 194 bool
194 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( 195 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid(
195 JNIEnv* env) { 196 JNIEnv* env) {
196 return RegisterNativesImpl(env); 197 return RegisterNativesImpl(env);
197 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698