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/context_utils.h" | 9 #include "base/android/context_utils.h" |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
11 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
12 #include "chrome/browser/android/tab_android.h" | 12 #include "chrome/browser/android/tab_android.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/net/predictor.h" | 14 #include "chrome/browser/net/predictor.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/common/chrome_content_client.h" | 17 #include "chrome/common/chrome_content_client.h" |
18 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
19 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/browser/storage_partition.h" | 20 #include "content/public/browser/storage_partition.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "jni/ChromeApplication_jni.h" | 22 #include "jni/ChromeApplication_jni.h" |
23 #include "net/cookies/cookie_store.h" | 23 #include "net/cookies/cookie_store.h" |
24 #include "net/url_request/url_request_context.h" | 24 #include "net/url_request/url_request_context.h" |
25 #include "net/url_request/url_request_context_getter.h" | 25 #include "net/url_request/url_request_context_getter.h" |
26 | 26 |
27 using base::android::ConvertUTF8ToJavaString; | 27 using base::android::ConvertUTF8ToJavaString; |
| 28 using base::android::JavaParamRef; |
| 29 using base::android::ScopedJavaLocalRef; |
28 | 30 |
29 namespace { | 31 namespace { |
30 | 32 |
31 void FlushCookiesOnIOThread( | 33 void FlushCookiesOnIOThread( |
32 scoped_refptr<net::URLRequestContextGetter> getter) { | 34 scoped_refptr<net::URLRequestContextGetter> getter) { |
33 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 35 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
34 getter->GetURLRequestContext()->cookie_store()->FlushStore(base::Closure()); | 36 getter->GetURLRequestContext()->cookie_store()->FlushStore(base::Closure()); |
35 } | 37 } |
36 | 38 |
37 void FlushStoragePartition(content::StoragePartition* partition) { | 39 void FlushStoragePartition(content::StoragePartition* partition) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 125 } |
124 | 126 |
125 bool ChromeApplication::AreParentalControlsEnabled() { | 127 bool ChromeApplication::AreParentalControlsEnabled() { |
126 return Java_ChromeApplication_areParentalControlsEnabled( | 128 return Java_ChromeApplication_areParentalControlsEnabled( |
127 base::android::AttachCurrentThread(), | 129 base::android::AttachCurrentThread(), |
128 base::android::GetApplicationContext()); | 130 base::android::GetApplicationContext()); |
129 } | 131 } |
130 | 132 |
131 } // namespace android | 133 } // namespace android |
132 } // namespace chrome | 134 } // namespace chrome |
OLD | NEW |