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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 10160013: Implement HostPortAllocator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/signaling_connector.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) 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 base::Bind(&HostProcess::OnOAuthFailed, base::Unretained(this)), 339 base::Bind(&HostProcess::OnOAuthFailed, base::Unretained(this)),
340 context_->url_request_context_getter()); 340 context_->url_request_context_getter());
341 } 341 }
342 } 342 }
343 343
344 if (!desktop_environment_.get()) { 344 if (!desktop_environment_.get()) {
345 desktop_environment_ = 345 desktop_environment_ =
346 DesktopEnvironment::CreateForService(context_.get()); 346 DesktopEnvironment::CreateForService(context_.get());
347 } 347 }
348 348
349 NetworkSettings network_settings(allow_nat_traversal_); 349 NetworkSettings network_settings(
350 allow_nat_traversal_ ?
351 NetworkSettings::NAT_TRAVERSAL_ENABLED :
352 NetworkSettings::NAT_TRAVERSAL_DISABLED);
350 if (!allow_nat_traversal_) { 353 if (!allow_nat_traversal_) {
351 network_settings.min_port = kMinPortNumber; 354 network_settings.min_port = kMinPortNumber;
352 network_settings.max_port = kMaxPortNumber; 355 network_settings.max_port = kMaxPortNumber;
353 } 356 }
354 357
355 host_ = new ChromotingHost( 358 host_ = new ChromotingHost(
356 context_.get(), signal_strategy_.get(), desktop_environment_.get(), 359 context_.get(), signal_strategy_.get(), desktop_environment_.get(),
357 network_settings); 360 network_settings);
358 361
359 heartbeat_sender_.reset(new HeartbeatSender( 362 heartbeat_sender_.reset(new HeartbeatSender(
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 int CALLBACK WinMain(HINSTANCE instance, 506 int CALLBACK WinMain(HINSTANCE instance,
504 HINSTANCE previous_instance, 507 HINSTANCE previous_instance,
505 LPSTR command_line, 508 LPSTR command_line,
506 int show_command) { 509 int show_command) {
507 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting 510 // CommandLine::Init() ignores the passed |argc| and |argv| on Windows getting
508 // the command line from GetCommandLineW(), so we can safely pass NULL here. 511 // the command line from GetCommandLineW(), so we can safely pass NULL here.
509 return main(0, NULL); 512 return main(0, NULL);
510 } 513 }
511 514
512 #endif // defined(OS_WIN) 515 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/plugin/host_script_object.cc ('k') | remoting/host/signaling_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698