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

Side by Side Diff: content/app/mojo/mojo_init.cc

Issue 2749853003: Making the Mojo Channel Messages legacy mode dynamic. (Closed)
Patch Set: Making the Mojo Channel Messages legacy mode dynamic. Created 3 years, 9 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 | « no previous file | mojo/edk/embedder/embedder.h » ('j') | mojo/edk/system/channel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/app/mojo/mojo_init.h" 5 #include "content/app/mojo/mojo_init.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "content/public/common/content_switches.h" 11 #include "content/public/common/content_switches.h"
12 #include "ipc/ipc_channel.h" 12 #include "ipc/ipc_channel.h"
13 #include "mojo/edk/embedder/embedder.h" 13 #include "mojo/edk/embedder/embedder.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 namespace { 17 namespace {
18 18
19 class MojoInitializer { 19 class MojoInitializer {
20 public: 20 public:
21 MojoInitializer() { 21 MojoInitializer() {
22 mojo::edk::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize); 22 mojo::edk::SetMaxMessageSize(IPC::Channel::kMaximumMessageSize);
23 #if defined(OS_CHROMEOS)
24 mojo::edk::SetUseLegacyTransportProtocol(true);
25 #endif
23 mojo::edk::Init(); 26 mojo::edk::Init();
24 } 27 }
25 }; 28 };
26 29
27 base::LazyInstance<MojoInitializer>::Leaky mojo_initializer; 30 base::LazyInstance<MojoInitializer>::Leaky mojo_initializer;
28 31
29 } // namespace 32 } // namespace
30 33
31 void InitializeMojo() { 34 void InitializeMojo() {
32 mojo_initializer.Get(); 35 mojo_initializer.Get();
33 } 36 }
34 37
35 } // namespace content 38 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/embedder/embedder.h » ('j') | mojo/edk/system/channel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698