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

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: Cleanup logging 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 #include "base/callback.h"
11
12 namespace remoting {
13
14 class ChromotingHostContext;
15
16 class ConnectionBlockChecker : public net::URLFetcherDelegate {
17 public:
18 ConnectionBlockChecker(ChromotingHostContext* context,
19 std::string talkgadget_prefix,
20 const base::Callback<void(bool)>& callback);
Sergey Ulanov 2012/08/29 20:10:29 it would be cleaner to pass callback to CheckStatu
garykac 2012/08/29 22:30:51 Done.
21 virtual ~ConnectionBlockChecker();
22
23 // Initiates a cecks the verify that there is a valid connection to the host
24 // talkgadget. Calls |callback_| with the result.
Sergey Ulanov 2012/08/29 20:10:29 nit: Calls the the |callback| specified in the con
garykac 2012/08/29 22:30:51 Done.
25 void CheckStatus();
26
27 private:
28 // net::URLFetcherDelegate interface.
29 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
Sergey Ulanov 2012/08/29 20:10:29 interface implementation must be public.
garykac 2012/08/29 22:30:51 Done.
30
31 ChromotingHostContext* context_;
32
33 // URL fetcher used to verify access to the host talkgadget.
34 scoped_ptr<net::URLFetcher> url_fetcher_;
35
36 // The string pre-pended to '.talkgadget.google.com' to create the full
37 // talkgadget domain name for the host.
38 std::string talkgadget_prefix_;
39
40 // Called with the results of the connection check.
41 const base::Callback<void(bool)> callback_;
42
43 DISALLOW_COPY_AND_ASSIGN(ConnectionBlockChecker);
44 };
45
46 } // namespace remoting
47
48 #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