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

Side by Side Diff: content/child/child_thread.cc

Issue 598483002: Fix WeakPtrFactory member ordering in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed order of friend class Created 6 years, 2 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
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 "content/child/child_thread.h" 5 #include "content/child/child_thread.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 ChildThread::ChildThreadMessageRouter::ChildThreadMessageRouter( 206 ChildThread::ChildThreadMessageRouter::ChildThreadMessageRouter(
207 IPC::Sender* sender) 207 IPC::Sender* sender)
208 : sender_(sender) {} 208 : sender_(sender) {}
209 209
210 bool ChildThread::ChildThreadMessageRouter::Send(IPC::Message* msg) { 210 bool ChildThread::ChildThreadMessageRouter::Send(IPC::Message* msg) {
211 return sender_->Send(msg); 211 return sender_->Send(msg);
212 } 212 }
213 213
214 ChildThread::ChildThread() 214 ChildThread::ChildThread()
215 : router_(this), 215 : router_(this),
216 channel_connected_factory_(this), 216 in_browser_process_(false),
217 in_browser_process_(false) { 217 channel_connected_factory_(this) {
218 Init(Options()); 218 Init(Options());
219 } 219 }
220 220
221 ChildThread::ChildThread(const Options& options) 221 ChildThread::ChildThread(const Options& options)
222 : router_(this), 222 : router_(this),
223 channel_connected_factory_(this), 223 in_browser_process_(true),
224 in_browser_process_(true) { 224 channel_connected_factory_(this) {
225 Init(options); 225 Init(options);
226 } 226 }
227 227
228 scoped_ptr<IPC::SyncChannel> ChildThread::CreateChannel(bool use_mojo_channel) { 228 scoped_ptr<IPC::SyncChannel> ChildThread::CreateChannel(bool use_mojo_channel) {
229 if (use_mojo_channel) { 229 if (use_mojo_channel) {
230 VLOG(1) << "Mojo is enabled on child"; 230 VLOG(1) << "Mojo is enabled on child";
231 return IPC::SyncChannel::Create( 231 return IPC::SyncChannel::Create(
232 IPC::ChannelMojo::CreateClientFactory(channel_name_), 232 IPC::ChannelMojo::CreateClientFactory(channel_name_),
233 this, 233 this,
234 ChildProcess::current()->io_message_loop_proxy(), 234 ChildProcess::current()->io_message_loop_proxy(),
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 void ChildThread::OnProcessBackgrounded(bool background) { 587 void ChildThread::OnProcessBackgrounded(bool background) {
588 // Set timer slack to maximum on main thread when in background. 588 // Set timer slack to maximum on main thread when in background.
589 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; 589 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE;
590 if (background) 590 if (background)
591 timer_slack = base::TIMER_SLACK_MAXIMUM; 591 timer_slack = base::TIMER_SLACK_MAXIMUM;
592 base::MessageLoop::current()->SetTimerSlack(timer_slack); 592 base::MessageLoop::current()->SetTimerSlack(timer_slack);
593 } 593 }
594 594
595 } // namespace content 595 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread.h ('k') | content/renderer/accessibility/renderer_accessibility_complete.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698