Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / remoting / base / service_urls.h
blob6e03e370a6ef708a3c3753e80cc9c226167872bf
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_BASE_SERVICE_URLS_H_
6 #define REMOTING_BASE_SERVICE_URLS_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/singleton.h"
13 namespace remoting {
15 // This class contains the URLs to the services used by the host (except for
16 // Gaia, which has its own GaiaUrls class. In debug builds, it allows these URLs
17 // to be overriden by command line switches, allowing the host process to be
18 // pointed at alternate/test servers.
19 class ServiceUrls {
20 public:
21 static ServiceUrls* GetInstance();
23 // Remoting directory REST API URLs.
24 const std::string& directory_base_url() const;
25 const std::string& directory_hosts_url() const;
27 // XMPP Server configuration.
28 const std::string& xmpp_server_address() const;
29 const std::string& xmpp_server_address_for_me2me_host() const;
30 bool xmpp_server_use_tls() const;
32 // Remoting directory bot JID (for registering hosts, logging, heartbeats).
33 const std::string& directory_bot_jid() const;
35 private:
36 friend struct DefaultSingletonTraits<ServiceUrls>;
38 ServiceUrls();
39 virtual ~ServiceUrls();
41 std::string directory_base_url_;
42 std::string directory_hosts_url_;
43 std::string xmpp_server_address_;
44 std::string xmpp_server_address_for_me2me_host_;
45 bool xmpp_server_use_tls_;
46 std::string directory_bot_jid_;
48 DISALLOW_COPY_AND_ASSIGN(ServiceUrls);
51 } // namespace remoting
53 #endif // REMOTING_BASE_SERVICE_URLS_H_