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

Side by Side Diff: remoting/host/connection_block_checker.h

Issue 10873050: [Chromoting] Hook up host talkgadget policy checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra comments/whitespace Created 8 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_CONNECTION_BLOCK_CHECKER_H_
6 #define REMOTING_HOST_CONNECTION_BLOCK_CHECKER_H_
7
8 #include "net/url_request/url_fetcher_delegate.h"
9
10 namespace remoting {
11
12 class ChromotingHostContext;
13
14 class ConnectionBlockChecker : public net::URLFetcherDelegate {
15 public:
16 enum Status {
17 UNKNOWN,
18 ALLOW,
19 DENY,
Sergey Ulanov 2012/08/28 00:33:42 UNKNOWN/DENY distinction is not reliable, so I thi
garykac 2012/08/29 00:07:15 Removed.
20 };
21
22 ConnectionBlockChecker(ChromotingHostContext* context,
23 std::string talkgadget_prefix);
24 virtual ~ConnectionBlockChecker() {}
Sergey Ulanov 2012/08/28 00:33:42 move destructor implementation to the .cc file. cl
garykac 2012/08/29 00:07:15 Done.
25
26 Status GetStatus();
27
28 private:
29 // net::URLFetcherDelegate interface.
30 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
31
32 ChromotingHostContext* context_;
33
34 // URL fetcher used to verify access to the host talkgadget.
35 scoped_ptr<net::URLFetcher> url_fetcher_;
36
37 // The string pre-pended to '.talkgadget.google.com' to create the full
38 // talkgadget domain name for the host.
39 std::string talkgadget_prefix_;
40
41 // Did we make a successful connection to the host talkgadget?
42 Status status_;
43
44 // Are we currently in the middle of a check?
45 bool check_pending_;
46
47 // Number of times we've tried to reach the talkgadget.
48 int reconnect_attempts_;
49
50 DISALLOW_COPY_AND_ASSIGN(ConnectionBlockChecker);
51 };
Sergey Ulanov 2012/08/28 00:33:42 nit: incorrect indentation
garykac 2012/08/29 00:07:15 Done.
52
53 } // namespace remoting
54
55 #endif // REMOTING_HOST_CONNECTION_BLOCK_CHECKER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/connection_block_checker.cc » ('j') | remoting/host/connection_block_checker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698