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_utils.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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 | 688 |
688 #if defined(USE_X11) | 689 #if defined(USE_X11) |
689 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); | 690 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); |
690 #endif | 691 #endif |
691 | 692 |
692 chrome::AddMetricsExtraParts(main_parts); | 693 chrome::AddMetricsExtraParts(main_parts); |
693 | 694 |
694 return main_parts; | 695 return main_parts; |
695 } | 696 } |
696 | 697 |
| 698 void ChromeContentBrowserClient::PostAfterStartupTask( |
| 699 const tracked_objects::Location& from_here, |
| 700 const scoped_refptr<base::TaskRunner>& task_runner, |
| 701 const base::Closure& task) { |
| 702 AfterStartupTaskUtils::PostTask(from_here, task_runner, task); |
| 703 } |
| 704 |
697 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( | 705 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( |
698 content::BrowserContext* browser_context, | 706 content::BrowserContext* browser_context, |
699 const GURL& site) { | 707 const GURL& site) { |
700 std::string partition_id; | 708 std::string partition_id; |
701 | 709 |
702 // The partition ID for webview guest processes is the string value of its | 710 // The partition ID for webview guest processes is the string value of its |
703 // SiteInstance URL - "chrome-guest://app_id/persist?partition". | 711 // SiteInstance URL - "chrome-guest://app_id/persist?partition". |
704 if (site.SchemeIs(content::kGuestScheme)) { | 712 if (site.SchemeIs(content::kGuestScheme)) { |
705 partition_id = site.spec(); | 713 partition_id = site.spec(); |
706 } else if (!switches::IsEnableWebviewBasedSignin() && | 714 } else if (!switches::IsEnableWebviewBasedSignin() && |
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 switches::kDisableWebRtcEncryption, | 2414 switches::kDisableWebRtcEncryption, |
2407 }; | 2415 }; |
2408 to_command_line->CopySwitchesFrom(from_command_line, | 2416 to_command_line->CopySwitchesFrom(from_command_line, |
2409 kWebRtcDevSwitchNames, | 2417 kWebRtcDevSwitchNames, |
2410 arraysize(kWebRtcDevSwitchNames)); | 2418 arraysize(kWebRtcDevSwitchNames)); |
2411 } | 2419 } |
2412 } | 2420 } |
2413 #endif // defined(ENABLE_WEBRTC) | 2421 #endif // defined(ENABLE_WEBRTC) |
2414 | 2422 |
2415 } // namespace chrome | 2423 } // namespace chrome |
OLD | NEW |