| 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 // A simple command-line app that registers and starts a host. | 5 // A simple command-line app that registers and starts a host. |
| 6 | 6 |
| 7 #include <stddef.h> |
| 7 #include <stdio.h> | 8 #include <stdio.h> |
| 8 | 9 |
| 9 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 12 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 13 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 15 #include "build/build_config.h" |
| 14 #include "net/url_request/url_fetcher.h" | 16 #include "net/url_request/url_fetcher.h" |
| 15 #include "net/url_request/url_request_context_getter.h" | 17 #include "net/url_request/url_request_context_getter.h" |
| 16 #include "remoting/base/logging.h" | 18 #include "remoting/base/logging.h" |
| 17 #include "remoting/base/service_urls.h" | 19 #include "remoting/base/service_urls.h" |
| 18 #include "remoting/base/url_request_context_getter.h" | 20 #include "remoting/base/url_request_context_getter.h" |
| 19 #include "remoting/host/setup/host_starter.h" | 21 #include "remoting/host/setup/host_starter.h" |
| 20 #include "remoting/host/setup/oauth_helper.h" | 22 #include "remoting/host/setup/oauth_helper.h" |
| 21 #include "remoting/host/setup/pin_validator.h" | 23 #include "remoting/host/setup/pin_validator.h" |
| 22 | 24 |
| 23 #if !defined(OS_WIN) | 25 #if !defined(OS_WIN) |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 207 |
| 206 // Destroy the HostStarter and URLRequestContextGetter before stopping the | 208 // Destroy the HostStarter and URLRequestContextGetter before stopping the |
| 207 // IO thread. | 209 // IO thread. |
| 208 host_starter.reset(); | 210 host_starter.reset(); |
| 209 url_request_context_getter = nullptr; | 211 url_request_context_getter = nullptr; |
| 210 | 212 |
| 211 io_thread.Stop(); | 213 io_thread.Stop(); |
| 212 | 214 |
| 213 return g_started ? 0 : 1; | 215 return g_started ? 0 : 1; |
| 214 } | 216 } |
| OLD | NEW |