Introduce new SPDY Version UMA histogram.
[chromium-blink-merge.git] / mojo / spy / spy.h
blobf2b6be9100c9ead0a292eca6e9166d4267d062dc
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 MOJO_SPY_SPY_H_
6 #define MOJO_SPY_SPY_H_
8 #include <string>
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
12 namespace base {
13 class Thread;
16 namespace mojo {
18 class ApplicationManager;
19 class SpyServerImpl;
21 // mojo::Spy is a troubleshooting and debugging aid. It helps tracking
22 // the mojo system core activities like messages, service creation, etc.
24 // The |options| parameter in the constructor comes from the command
25 // line of the mojo_shell. Which takes --spy=<options>. Each option is
26 // separated by ',' and each option is a key+ value pair separated by ':'.
28 // For example --spy=port:13333
30 class Spy {
31 public:
32 Spy(mojo::ApplicationManager* application_manager,
33 const std::string& options);
34 ~Spy();
36 private:
37 scoped_refptr<SpyServerImpl> spy_server_;
38 // This thread runs the code that talks to the frontend.
39 scoped_ptr<base::Thread> control_thread_;
42 } // namespace mojo
44 #endif // MOJO_SPY_SPY_H_