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

Side by Side Diff: content/browser/browser_child_process_host.cc

Issue 6825038: Create a content::ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_child_process_host.h ('k') | content/browser/mock_resource_context.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/browser_child_process_host.h" 5 #include "content/browser/browser_child_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 Details<ChildProcessInfo>(&info_)); 52 Details<ChildProcessInfo>(&info_));
53 } 53 }
54 54
55 private: 55 private:
56 NotificationType notification_type_; 56 NotificationType notification_type_;
57 ChildProcessInfo info_; 57 ChildProcessInfo info_;
58 }; 58 };
59 59
60 } // namespace 60 } // namespace
61 61
62 // DEPRECATED constructor. Do not use anymore.
63 BrowserChildProcessHost::BrowserChildProcessHost(
64 ChildProcessInfo::ProcessType type,
65 ResourceDispatcherHost* resource_dispatcher_host)
66 : ChildProcessInfo(type, -1),
67 ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)),
68 resource_dispatcher_host_(resource_dispatcher_host) {
69 if (resource_dispatcher_host_) {
70 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
71 id(), type, resource_dispatcher_host_);
72 AddFilter(resource_message_filter);
73 }
74
75 AddFilter(new TraceMessageFilter);
76
77 g_child_process_list.Get().push_back(this);
78 }
79
80 BrowserChildProcessHost::BrowserChildProcessHost( 62 BrowserChildProcessHost::BrowserChildProcessHost(
81 ChildProcessInfo::ProcessType type) 63 ChildProcessInfo::ProcessType type)
82 : ChildProcessInfo(type, -1), 64 : ChildProcessInfo(type, -1),
83 ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), 65 ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)) {
84 resource_dispatcher_host_(NULL) {
85 AddFilter(new TraceMessageFilter); 66 AddFilter(new TraceMessageFilter);
86 67
87 g_child_process_list.Get().push_back(this); 68 g_child_process_list.Get().push_back(this);
88 } 69 }
89 70
90 BrowserChildProcessHost::~BrowserChildProcessHost() { 71 BrowserChildProcessHost::~BrowserChildProcessHost() {
91 g_child_process_list.Get().remove(this); 72 g_child_process_list.Get().remove(this);
92 } 73 }
93 74
94 // static 75 // static
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 214
234 return *iterator_; 215 return *iterator_;
235 } while (true); 216 } while (true);
236 217
237 return NULL; 218 return NULL;
238 } 219 }
239 220
240 bool BrowserChildProcessHost::Iterator::Done() { 221 bool BrowserChildProcessHost::Iterator::Done() {
241 return iterator_ == g_child_process_list.Get().end(); 222 return iterator_ == g_child_process_list.Get().end();
242 } 223 }
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host.h ('k') | content/browser/mock_resource_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698