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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/files/scoped_file.h" | 13 #include "base/files/scoped_file.h" |
14 #include "base/i18n/icu_util.h" | 14 #include "base/i18n/icu_util.h" |
15 #include "base/lazy_instance.h" | 15 #include "base/lazy_instance.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "base/prefs/scoped_user_pref_update.h" | 18 #include "base/prefs/scoped_user_pref_update.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
| 22 #include "chrome/browser/after_startup_task.h" |
22 #include "chrome/browser/browser_about_handler.h" | 23 #include "chrome/browser/browser_about_handler.h" |
23 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
24 #include "chrome/browser/browser_shutdown.h" | 25 #include "chrome/browser/browser_shutdown.h" |
25 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 26 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
26 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 27 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
27 #include "chrome/browser/character_encoding.h" | 28 #include "chrome/browser/character_encoding.h" |
28 #include "chrome/browser/chrome_content_browser_client_parts.h" | 29 #include "chrome/browser/chrome_content_browser_client_parts.h" |
29 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 30 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
30 #include "chrome/browser/chrome_quota_permission_context.h" | 31 #include "chrome/browser/chrome_quota_permission_context.h" |
31 #include "chrome/browser/content_settings/cookie_settings.h" | 32 #include "chrome/browser/content_settings/cookie_settings.h" |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 | 783 |
783 #if defined(USE_X11) | 784 #if defined(USE_X11) |
784 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); | 785 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); |
785 #endif | 786 #endif |
786 | 787 |
787 chrome::AddMetricsExtraParts(main_parts); | 788 chrome::AddMetricsExtraParts(main_parts); |
788 | 789 |
789 return main_parts; | 790 return main_parts; |
790 } | 791 } |
791 | 792 |
| 793 void ChromeContentBrowserClient::PostAfterStartupTask( |
| 794 const tracked_objects::Location& from_here, |
| 795 const scoped_refptr<base::TaskRunner>& task_runner, |
| 796 const base::Closure& task) { |
| 797 ::PostAfterStartupTask(from_here, task_runner, task); |
| 798 } |
| 799 |
792 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( | 800 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( |
793 content::BrowserContext* browser_context, | 801 content::BrowserContext* browser_context, |
794 const GURL& site) { | 802 const GURL& site) { |
795 std::string partition_id; | 803 std::string partition_id; |
796 | 804 |
797 // The partition ID for webview guest processes is the string value of its | 805 // The partition ID for webview guest processes is the string value of its |
798 // SiteInstance URL - "chrome-guest://app_id/persist?partition". | 806 // SiteInstance URL - "chrome-guest://app_id/persist?partition". |
799 if (site.SchemeIs(content::kGuestScheme)) { | 807 if (site.SchemeIs(content::kGuestScheme)) { |
800 partition_id = site.spec(); | 808 partition_id = site.spec(); |
801 } else if (!switches::IsEnableWebviewBasedSignin() && | 809 } else if (!switches::IsEnableWebviewBasedSignin() && |
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2591 switches::kDisableWebRtcEncryption, | 2599 switches::kDisableWebRtcEncryption, |
2592 }; | 2600 }; |
2593 to_command_line->CopySwitchesFrom(from_command_line, | 2601 to_command_line->CopySwitchesFrom(from_command_line, |
2594 kWebRtcDevSwitchNames, | 2602 kWebRtcDevSwitchNames, |
2595 arraysize(kWebRtcDevSwitchNames)); | 2603 arraysize(kWebRtcDevSwitchNames)); |
2596 } | 2604 } |
2597 } | 2605 } |
2598 #endif // defined(ENABLE_WEBRTC) | 2606 #endif // defined(ENABLE_WEBRTC) |
2599 | 2607 |
2600 } // namespace chrome | 2608 } // namespace chrome |
OLD | NEW |