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

Side by Side Diff: ipc/ipc_logging.h

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_logging.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef IPC_IPC_LOGGING_H_ 5 #ifndef IPC_IPC_LOGGING_H_
6 #define IPC_IPC_LOGGING_H_ 6 #define IPC_IPC_LOGGING_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. 9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
10 10
(...skipping 28 matching lines...) Expand all
39 public: 39 public:
40 virtual void Log(const LogData& data) = 0; 40 virtual void Log(const LogData& data) = 0;
41 41
42 protected: 42 protected:
43 virtual ~Consumer() {} 43 virtual ~Consumer() {}
44 }; 44 };
45 45
46 void SetConsumer(Consumer* consumer); 46 void SetConsumer(Consumer* consumer);
47 47
48 ~Logging(); 48 ~Logging();
49 static Logging* current(); 49 static Logging* GetInstance();
50 50
51 // Enable and Disable are NOT cross-process; they only affect the 51 // Enable and Disable are NOT cross-process; they only affect the
52 // current thread/process. If you want to modify the value for all 52 // current thread/process. If you want to modify the value for all
53 // processes, perhaps your intent is to call 53 // processes, perhaps your intent is to call
54 // g_browser_process->SetIPCLoggingEnabled(). 54 // g_browser_process->SetIPCLoggingEnabled().
55 void Enable(); 55 void Enable();
56 void Disable(); 56 void Disable();
57 bool Enabled() const { return enabled_; } 57 bool Enabled() const { return enabled_; }
58 58
59 // Called by child processes to give the logger object the channel to send 59 // Called by child processes to give the logger object the channel to send
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 Consumer* consumer_; 107 Consumer* consumer_;
108 108
109 static LogFunctionMap* log_function_map_; 109 static LogFunctionMap* log_function_map_;
110 }; 110 };
111 111
112 } // namespace IPC 112 } // namespace IPC
113 113
114 #endif // IPC_MESSAGE_LOG_ENABLED 114 #endif // IPC_MESSAGE_LOG_ENABLED
115 115
116 #endif // IPC_IPC_LOGGING_H_ 116 #endif // IPC_IPC_LOGGING_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698