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

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

Issue 1061903002: Disable chromoting service on permanent errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « remoting/host/daemon_process_win.cc ('k') | no next file » | 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 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 scoped_ptr<ChromotingHostContext> context = 1538 scoped_ptr<ChromotingHostContext> context =
1539 ChromotingHostContext::Create(new AutoThreadTaskRunner( 1539 ChromotingHostContext::Create(new AutoThreadTaskRunner(
1540 message_loop.message_loop_proxy(), base::MessageLoop::QuitClosure())); 1540 message_loop.message_loop_proxy(), base::MessageLoop::QuitClosure()));
1541 if (!context) 1541 if (!context)
1542 return kInitializationFailed; 1542 return kInitializationFailed;
1543 1543
1544 // NetworkChangeNotifier must be initialized after MessageLoop. 1544 // NetworkChangeNotifier must be initialized after MessageLoop.
1545 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( 1545 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier(
1546 net::NetworkChangeNotifier::Create()); 1546 net::NetworkChangeNotifier::Create());
1547 1547
1548 // BasicURLRequestContext holds references to threads, so it needs to be
1549 // dereferences on UI threads. Store the reference to the URLRequestGetter to
1550 // make sure it's not destroyed on other threads.
1551 // TODO(sergeyu): Consider fixing it in BasicURLRequestContext.
1552 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter =
1553 context->url_request_context_getter();
1554
1555 // Create & start the HostProcess using these threads. 1548 // Create & start the HostProcess using these threads.
1556 // TODO(wez): The HostProcess holds a reference to itself until Shutdown(). 1549 // TODO(wez): The HostProcess holds a reference to itself until Shutdown().
1557 // Remove this hack as part of the multi-process refactoring. 1550 // Remove this hack as part of the multi-process refactoring.
1558 int exit_code = kSuccessExitCode; 1551 int exit_code = kSuccessExitCode;
1559 ShutdownWatchdog shutdown_watchdog( 1552 ShutdownWatchdog shutdown_watchdog(
1560 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1553 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1561 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog); 1554 new HostProcess(context.Pass(), &exit_code, &shutdown_watchdog);
1562 1555
1563 // Run the main (also UI) message loop until the host no longer needs it. 1556 // Run the main (also UI) message loop until the host no longer needs it.
1564 message_loop.Run(); 1557 message_loop.Run();
1565 1558
1566 return exit_code; 1559 return exit_code;
1567 } 1560 }
1568 1561
1569 } // namespace remoting 1562 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698