OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 #elif defined(OS_MACOSX) | 112 #elif defined(OS_MACOSX) |
113 #include "chrome/browser/chrome_browser_main_mac.h" | 113 #include "chrome/browser/chrome_browser_main_mac.h" |
114 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 114 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
115 #elif defined(OS_CHROMEOS) | 115 #elif defined(OS_CHROMEOS) |
116 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 116 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
117 #include "chrome/browser/chromeos/login/user_manager.h" | 117 #include "chrome/browser/chromeos/login/user_manager.h" |
118 #elif defined(OS_LINUX) | 118 #elif defined(OS_LINUX) |
119 #include "chrome/browser/chrome_browser_main_linux.h" | 119 #include "chrome/browser/chrome_browser_main_linux.h" |
120 #elif defined(OS_ANDROID) | 120 #elif defined(OS_ANDROID) |
121 #include "chrome/browser/chrome_browser_main_android.h" | 121 #include "chrome/browser/chrome_browser_main_android.h" |
| 122 #include "net/android/network_library.h" |
122 #elif defined(OS_POSIX) | 123 #elif defined(OS_POSIX) |
123 #include "chrome/browser/chrome_browser_main_posix.h" | 124 #include "chrome/browser/chrome_browser_main_posix.h" |
124 #endif | 125 #endif |
125 | 126 |
126 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_ANDROID) | 127 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_ANDROID) |
127 #include "base/linux_util.h" | 128 #include "base/linux_util.h" |
128 #include "chrome/browser/crash_handler_host_linux.h" | 129 #include "chrome/browser/crash_handler_host_linux.h" |
129 #endif | 130 #endif |
130 | 131 |
131 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 132 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 | 1271 |
1271 void ChromeContentBrowserClient::AddNewCertificate( | 1272 void ChromeContentBrowserClient::AddNewCertificate( |
1272 net::URLRequest* request, | 1273 net::URLRequest* request, |
1273 net::X509Certificate* cert, | 1274 net::X509Certificate* cert, |
1274 int render_process_id, | 1275 int render_process_id, |
1275 int render_view_id) { | 1276 int render_view_id) { |
1276 // The handler will run the UI and delete itself when it's finished. | 1277 // The handler will run the UI and delete itself when it's finished. |
1277 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); | 1278 new SSLAddCertHandler(request, cert, render_process_id, render_view_id); |
1278 } | 1279 } |
1279 | 1280 |
| 1281 #if defined(OS_ANDROID) |
| 1282 void ChromeContentBrowserClient::AddNewCertificateOrKeychainAndroid( |
| 1283 net::URLRequest* request, |
| 1284 const char* data, |
| 1285 size_t data_len, |
| 1286 bool is_pkcs12) { |
| 1287 // This launches a new Android activity (CertInstaller). |
| 1288 (void)request; |
| 1289 net::android::StoreCertificateOrKeychain(data, data_len, is_pkcs12); |
| 1290 } |
| 1291 #endif |
| 1292 |
1280 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { | 1293 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { |
1281 return MediaInternals::GetInstance(); | 1294 return MediaInternals::GetInstance(); |
1282 } | 1295 } |
1283 | 1296 |
1284 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( | 1297 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( |
1285 const GURL& source_origin, | 1298 const GURL& source_origin, |
1286 int callback_context, | 1299 int callback_context, |
1287 int render_process_id, | 1300 int render_process_id, |
1288 int render_view_id) { | 1301 int render_view_id) { |
1289 #if defined(ENABLE_NOTIFICATIONS) | 1302 #if defined(ENABLE_NOTIFICATIONS) |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 partition_id = extension->id(); | 1816 partition_id = extension->id(); |
1804 } | 1817 } |
1805 | 1818 |
1806 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1819 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
1807 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1820 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
1808 return partition_id; | 1821 return partition_id; |
1809 } | 1822 } |
1810 | 1823 |
1811 | 1824 |
1812 } // namespace chrome | 1825 } // namespace chrome |
OLD | NEW |