| OLD | NEW |
| 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 "chrome/browser/android/chrome_application.h" | 5 #include "chrome/browser/android/chrome_application.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 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" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 net::CookieStore::DeleteCallback()); | 64 net::CookieStore::DeleteCallback()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void RemoveSessionCookiesForProfile(Profile* profile) { | 67 void RemoveSessionCookiesForProfile(Profile* profile) { |
| 68 content::BrowserThread::PostTask( | 68 content::BrowserThread::PostTask( |
| 69 content::BrowserThread::IO, FROM_HERE, | 69 content::BrowserThread::IO, FROM_HERE, |
| 70 base::Bind(&RemoveSessionCookiesOnIOThread, | 70 base::Bind(&RemoveSessionCookiesOnIOThread, |
| 71 make_scoped_refptr(profile->GetRequestContext()))); | 71 make_scoped_refptr(profile->GetRequestContext()))); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void ChangeAppStatusOnIOThread(SafeBrowsingService* sb_service, | 74 void ChangeAppStatusOnIOThread(safe_browsing::SafeBrowsingService* sb_service, |
| 75 jboolean foreground) { | 75 jboolean foreground) { |
| 76 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 76 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 77 SafeBrowsingProtocolManager* proto_manager = sb_service->protocol_manager(); | 77 safe_browsing::SafeBrowsingProtocolManager* proto_manager = |
| 78 sb_service->protocol_manager(); |
| 78 if (proto_manager) | 79 if (proto_manager) |
| 79 proto_manager->SetAppInForeground(foreground); | 80 proto_manager->SetAppInForeground(foreground); |
| 80 } | 81 } |
| 81 | 82 |
| 82 } // namespace | 83 } // namespace |
| 83 | 84 |
| 84 static ScopedJavaLocalRef<jstring> GetBrowserUserAgent( | 85 static ScopedJavaLocalRef<jstring> GetBrowserUserAgent( |
| 85 JNIEnv* env, | 86 JNIEnv* env, |
| 86 const JavaParamRef<jclass>& clazz) { | 87 const JavaParamRef<jclass>& clazz) { |
| 87 return ConvertUTF8ToJavaString(env, GetUserAgent()); | 88 return ConvertUTF8ToJavaString(env, GetUserAgent()); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 147 } |
| 147 | 148 |
| 148 bool ChromeApplication::AreParentalControlsEnabled() { | 149 bool ChromeApplication::AreParentalControlsEnabled() { |
| 149 return Java_ChromeApplication_areParentalControlsEnabled( | 150 return Java_ChromeApplication_areParentalControlsEnabled( |
| 150 base::android::AttachCurrentThread(), | 151 base::android::AttachCurrentThread(), |
| 151 base::android::GetApplicationContext()); | 152 base::android::GetApplicationContext()); |
| 152 } | 153 } |
| 153 | 154 |
| 154 } // namespace android | 155 } // namespace android |
| 155 } // namespace chrome | 156 } // namespace chrome |
| OLD | NEW |