OLD | NEW |
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/shell/shell_browser_main_parts.h" | 5 #include "content/shell/shell_browser_main_parts.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #if defined(OS_ANDROID) | 99 #if defined(OS_ANDROID) |
100 net::NetworkChangeNotifier::SetFactory( | 100 net::NetworkChangeNotifier::SetFactory( |
101 new net::NetworkChangeNotifierFactoryAndroid()); | 101 new net::NetworkChangeNotifierFactoryAndroid()); |
102 #endif | 102 #endif |
103 } | 103 } |
104 | 104 |
105 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 105 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
106 browser_context_.reset(new ShellBrowserContext(false)); | 106 browser_context_.reset(new ShellBrowserContext(false)); |
107 off_the_record_browser_context_.reset(new ShellBrowserContext(true)); | 107 off_the_record_browser_context_.reset(new ShellBrowserContext(true)); |
108 | 108 |
109 Shell::PlatformInitialize(); | 109 Shell::Initialize(); |
110 net::NetModule::SetResourceProvider(PlatformResourceProvider); | 110 net::NetModule::SetResourceProvider(PlatformResourceProvider); |
111 | 111 |
112 int port = 0; | 112 int port = 0; |
113 // On android the port number isn't used. | 113 // On android the port number isn't used. |
114 #if !defined(OS_ANDROID) | 114 #if !defined(OS_ANDROID) |
115 // See if the user specified a port on the command line (useful for | 115 // See if the user specified a port on the command line (useful for |
116 // automation). If not, use an ephemeral port by specifying 0. | 116 // automation). If not, use an ephemeral port by specifying 0. |
117 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 117 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
118 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { | 118 if (command_line.HasSwitch(switches::kRemoteDebuggingPort)) { |
119 int temp_port; | 119 int temp_port; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #if defined(USE_AURA) | 152 #if defined(USE_AURA) |
153 Shell::PlatformExit(); | 153 Shell::PlatformExit(); |
154 #endif | 154 #endif |
155 if (devtools_delegate_) | 155 if (devtools_delegate_) |
156 devtools_delegate_->Stop(); | 156 devtools_delegate_->Stop(); |
157 browser_context_.reset(); | 157 browser_context_.reset(); |
158 off_the_record_browser_context_.reset(); | 158 off_the_record_browser_context_.reset(); |
159 } | 159 } |
160 | 160 |
161 } // namespace | 161 } // namespace |
OLD | NEW |