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

Side by Side Diff: content/browser/frame_host/navigation_controller_android.cc

Issue 2292443003: Support host-based deletion for SSLHostStateDelegate (Closed)
Patch Set: Revert changes in ContentSettingPattern, convert pattern directly to URL Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/browser/frame_host/navigation_controller_android.h" 5 #include "content/browser/frame_host/navigation_controller_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
11 #include "base/callback.h"
11 #include "content/browser/frame_host/navigation_controller_impl.h" 12 #include "content/browser/frame_host/navigation_controller_impl.h"
12 #include "content/browser/frame_host/navigation_entry_impl.h" 13 #include "content/browser/frame_host/navigation_entry_impl.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "content/public/browser/ssl_host_state_delegate.h" 15 #include "content/public/browser/ssl_host_state_delegate.h"
15 #include "content/public/common/resource_request_body.h" 16 #include "content/public/common/resource_request_body.h"
16 #include "jni/NavigationControllerImpl_jni.h" 17 #include "jni/NavigationControllerImpl_jni.h"
17 #include "net/base/data_url.h" 18 #include "net/base/data_url.h"
18 #include "ui/gfx/android/java_bitmap.h" 19 #include "ui/gfx/android/java_bitmap.h"
19 20
20 using base::android::AttachCurrentThread; 21 using base::android::AttachCurrentThread;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 return ScopedJavaLocalRef<jstring>(env, NULL); 313 return ScopedJavaLocalRef<jstring>(env, NULL);
313 return ConvertUTF8ToJavaString(env, entry->GetOriginalRequestURL().spec()); 314 return ConvertUTF8ToJavaString(env, entry->GetOriginalRequestURL().spec());
314 } 315 }
315 316
316 void NavigationControllerAndroid::ClearSslPreferences( 317 void NavigationControllerAndroid::ClearSslPreferences(
317 JNIEnv* env, 318 JNIEnv* env,
318 const JavaParamRef<jobject>& obj) { 319 const JavaParamRef<jobject>& obj) {
319 content::SSLHostStateDelegate* delegate = 320 content::SSLHostStateDelegate* delegate =
320 navigation_controller_->GetBrowserContext()->GetSSLHostStateDelegate(); 321 navigation_controller_->GetBrowserContext()->GetSSLHostStateDelegate();
321 if (delegate) 322 if (delegate)
322 delegate->Clear(); 323 delegate->Clear(base::Callback<bool(const std::string&)>());
323 } 324 }
324 325
325 bool NavigationControllerAndroid::GetUseDesktopUserAgent( 326 bool NavigationControllerAndroid::GetUseDesktopUserAgent(
326 JNIEnv* env, 327 JNIEnv* env,
327 const JavaParamRef<jobject>& obj) { 328 const JavaParamRef<jobject>& obj) {
328 NavigationEntry* entry = navigation_controller_->GetVisibleEntry(); 329 NavigationEntry* entry = navigation_controller_->GetVisibleEntry();
329 return entry && entry->GetIsOverridingUserAgent(); 330 return entry && entry->GetIsOverridingUserAgent();
330 } 331 }
331 332
332 void NavigationControllerAndroid::SetUseDesktopUserAgent( 333 void NavigationControllerAndroid::SetUseDesktopUserAgent(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 const JavaParamRef<jobject>& obj, 419 const JavaParamRef<jobject>& obj,
419 jlong source_navigation_controller_android, 420 jlong source_navigation_controller_android,
420 jboolean replace_entry) { 421 jboolean replace_entry) {
421 navigation_controller_->CopyStateFromAndPrune( 422 navigation_controller_->CopyStateFromAndPrune(
422 reinterpret_cast<NavigationControllerAndroid*>( 423 reinterpret_cast<NavigationControllerAndroid*>(
423 source_navigation_controller_android)->navigation_controller_, 424 source_navigation_controller_android)->navigation_controller_,
424 replace_entry); 425 replace_entry);
425 } 426 }
426 427
427 } // namespace content 428 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698