Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 949293002: Implement a poor man's PostAfterStartupTask() function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/files/scoped_file.h" 14 #include "base/files/scoped_file.h"
15 #include "base/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/lazy_instance.h" 16 #include "base/lazy_instance.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/prefs/pref_service.h" 18 #include "base/prefs/pref_service.h"
19 #include "base/prefs/scoped_user_pref_update.h" 19 #include "base/prefs/scoped_user_pref_update.h"
20 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/sequenced_worker_pool.h" 22 #include "base/threading/sequenced_worker_pool.h"
23 #include "chrome/browser/after_startup_task_utils.h"
23 #include "chrome/browser/browser_about_handler.h" 24 #include "chrome/browser/browser_about_handler.h"
24 #include "chrome/browser/browser_process.h" 25 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/browser_shutdown.h" 26 #include "chrome/browser/browser_shutdown.h"
26 #include "chrome/browser/browsing_data/browsing_data_helper.h" 27 #include "chrome/browser/browsing_data/browsing_data_helper.h"
27 #include "chrome/browser/browsing_data/browsing_data_remover.h" 28 #include "chrome/browser/browsing_data/browsing_data_remover.h"
28 #include "chrome/browser/character_encoding.h" 29 #include "chrome/browser/character_encoding.h"
29 #include "chrome/browser/chrome_content_browser_client_parts.h" 30 #include "chrome/browser/chrome_content_browser_client_parts.h"
30 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 31 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
31 #include "chrome/browser/chrome_quota_permission_context.h" 32 #include "chrome/browser/chrome_quota_permission_context.h"
32 #include "chrome/browser/content_settings/cookie_settings.h" 33 #include "chrome/browser/content_settings/cookie_settings.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 714
714 #if defined(USE_X11) 715 #if defined(USE_X11)
715 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11()); 716 main_parts->AddParts(new ChromeBrowserMainExtraPartsX11());
716 #endif 717 #endif
717 718
718 chrome::AddMetricsExtraParts(main_parts); 719 chrome::AddMetricsExtraParts(main_parts);
719 720
720 return main_parts; 721 return main_parts;
721 } 722 }
722 723
724 void ChromeContentBrowserClient::PostAfterStartupTask(
725 const tracked_objects::Location& from_here,
726 const scoped_refptr<base::TaskRunner>& task_runner,
727 const base::Closure& task) {
728 AfterStartupTaskUtils::PostTask(from_here, task_runner, task);
729 }
730
723 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite( 731 std::string ChromeContentBrowserClient::GetStoragePartitionIdForSite(
724 content::BrowserContext* browser_context, 732 content::BrowserContext* browser_context,
725 const GURL& site) { 733 const GURL& site) {
726 std::string partition_id; 734 std::string partition_id;
727 735
728 // The partition ID for webview guest processes is the string value of its 736 // The partition ID for webview guest processes is the string value of its
729 // SiteInstance URL - "chrome-guest://app_id/persist?partition". 737 // SiteInstance URL - "chrome-guest://app_id/persist?partition".
730 if (site.SchemeIs(content::kGuestScheme)) { 738 if (site.SchemeIs(content::kGuestScheme)) {
731 partition_id = site.spec(); 739 partition_id = site.spec();
732 } else if (!switches::IsEnableWebviewBasedSignin() && 740 } else if (!switches::IsEnableWebviewBasedSignin() &&
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 switches::kDisableWebRtcEncryption, 2450 switches::kDisableWebRtcEncryption,
2443 }; 2451 };
2444 to_command_line->CopySwitchesFrom(from_command_line, 2452 to_command_line->CopySwitchesFrom(from_command_line,
2445 kWebRtcDevSwitchNames, 2453 kWebRtcDevSwitchNames,
2446 arraysize(kWebRtcDevSwitchNames)); 2454 arraysize(kWebRtcDevSwitchNames));
2447 } 2455 }
2448 } 2456 }
2449 #endif // defined(ENABLE_WEBRTC) 2457 #endif // defined(ENABLE_WEBRTC)
2450 2458
2451 } // namespace chrome 2459 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698