| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index 5df66318d42a5cc76c8f9307976153f4f4f72691..b6a2eea2b8aa2e4fde1c6d6a0c41023ba0bb5576 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -210,18 +210,40 @@ ChildThreadImpl::Options::Options()
|
| in_browser_process(false) {
|
| }
|
|
|
| -ChildThreadImpl::Options::Options(bool mojo)
|
| - : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| - switches::kProcessChannelID)),
|
| - use_mojo_channel(mojo),
|
| - in_browser_process(true) {
|
| +ChildThreadImpl::Options::~Options() {
|
| }
|
|
|
| -ChildThreadImpl::Options::Options(std::string name, bool mojo)
|
| - : channel_name(name), use_mojo_channel(mojo), in_browser_process(true) {
|
| +ChildThreadImpl::Options::Builder::Builder() {
|
| }
|
|
|
| -ChildThreadImpl::Options::~Options() {
|
| +ChildThreadImpl::Options::Builder&
|
| +ChildThreadImpl::Options::Builder::InBrowserProcess(bool in_browser_process) {
|
| + options_.in_browser_process = in_browser_process;
|
| + return *this;
|
| +}
|
| +
|
| +ChildThreadImpl::Options::Builder&
|
| +ChildThreadImpl::Options::Builder::UseMojoChannel(bool use_mojo_channel) {
|
| + options_.use_mojo_channel = use_mojo_channel;
|
| + return *this;
|
| +}
|
| +
|
| +ChildThreadImpl::Options::Builder&
|
| +ChildThreadImpl::Options::Builder::WithChannelName(
|
| + const std::string& channel_name) {
|
| + options_.channel_name = channel_name;
|
| + return *this;
|
| +}
|
| +
|
| +ChildThreadImpl::Options::Builder&
|
| +ChildThreadImpl::Options::Builder::AddStartupFilter(
|
| + IPC::MessageFilter* filter) {
|
| + options_.startup_filters.push_back(filter);
|
| + return *this;
|
| +}
|
| +
|
| +ChildThreadImpl::Options ChildThreadImpl::Options::Builder::Build() {
|
| + return options_;
|
| }
|
|
|
| ChildThreadImpl::ChildThreadMessageRouter::ChildThreadMessageRouter(
|
| @@ -236,7 +258,7 @@ ChildThreadImpl::ChildThreadImpl()
|
| : router_(this),
|
| in_browser_process_(false),
|
| channel_connected_factory_(this) {
|
| - Init(Options());
|
| + Init(Options::Builder().Build());
|
| }
|
|
|
| ChildThreadImpl::ChildThreadImpl(const Options& options)
|
|
|