diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 17:29:12 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 17:29:12 +0000 |
commit | 38917fef1116c1bc53aecef85608bfea2066542c (patch) | |
tree | 8293cd3a1fc1a69dfe0476053d2f14a4bc6e8ff8 | |
parent | 42ecd8ab9d02965313bb54049713f24cb2a424c4 (diff) | |
download | chromium_src-38917fef1116c1bc53aecef85608bfea2066542c.zip chromium_src-38917fef1116c1bc53aecef85608bfea2066542c.tar.gz chromium_src-38917fef1116c1bc53aecef85608bfea2066542c.tar.bz2 |
Mark old BrowserChildProcessHost constructor as deprecated.
Provide a new one that doesn't make it easy to use the default URLRequestContext.
BUG=78596
TEST=none
Review URL: http://codereview.chromium.org/6802007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80645 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/browser_child_process_host.cc | 12 | ||||
-rw-r--r-- | content/browser/browser_child_process_host.h | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/content/browser/browser_child_process_host.cc b/content/browser/browser_child_process_host.cc index 9109507..1976662 100644 --- a/content/browser/browser_child_process_host.cc +++ b/content/browser/browser_child_process_host.cc @@ -59,7 +59,7 @@ class ChildNotificationTask : public Task { } // namespace - +// DEPRECATED constructor. Do not use anymore. BrowserChildProcessHost::BrowserChildProcessHost( ChildProcessInfo::ProcessType type, ResourceDispatcherHost* resource_dispatcher_host) @@ -77,6 +77,16 @@ BrowserChildProcessHost::BrowserChildProcessHost( g_child_process_list.Get().push_back(this); } +BrowserChildProcessHost::BrowserChildProcessHost( + ChildProcessInfo::ProcessType type) + : ChildProcessInfo(type, -1), + ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), + resource_dispatcher_host_(NULL) { + AddFilter(new TraceMessageFilter); + + g_child_process_list.Get().push_back(this); +} + BrowserChildProcessHost::~BrowserChildProcessHost() { g_child_process_list.Get().remove(this); } diff --git a/content/browser/browser_child_process_host.h b/content/browser/browser_child_process_host.h index dd1c4ff1b..7c48ab7 100644 --- a/content/browser/browser_child_process_host.h +++ b/content/browser/browser_child_process_host.h @@ -56,12 +56,14 @@ class BrowserChildProcessHost : public ChildProcessHost, }; protected: - // A convenient constructor for those classes that want to use the default - // net::URLRequestContext. + // DEPRECATED constructor. Do not use anymore. We are trying to eliminate + // using the default URLRequestContext. BrowserChildProcessHost( ChildProcessInfo::ProcessType type, ResourceDispatcherHost* resource_dispatcher_host); + explicit BrowserChildProcessHost(ChildProcessInfo::ProcessType type); + // Derived classes call this to launch the child process asynchronously. void Launch( #if defined(OS_WIN) |