OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // the logs accumulated so far. (It returns by value, not const ref, to | 44 // the logs accumulated so far. (It returns by value, not const ref, to |
45 // provide a snapshot as opposed to a link to |accumulated_logs_|.) | 45 // provide a snapshot as opposed to a link to |accumulated_logs_|.) |
46 std::string RegisterReceiver(LogReceiver* receiver); | 46 std::string RegisterReceiver(LogReceiver* receiver); |
47 // Remove |receiver| from the observers list. | 47 // Remove |receiver| from the observers list. |
48 void UnregisterReceiver(LogReceiver* receiver); | 48 void UnregisterReceiver(LogReceiver* receiver); |
49 | 49 |
50 private: | 50 private: |
51 // Observer lists for clients and receivers. The |true| in the template | 51 // Observer lists for clients and receivers. The |true| in the template |
52 // specialisation means that they will check that all observers were removed | 52 // specialisation means that they will check that all observers were removed |
53 // on destruction. | 53 // on destruction. |
54 ObserverList<PasswordManagerClient, true> clients_; | 54 base::ObserverList<PasswordManagerClient, true> clients_; |
55 ObserverList<LogReceiver, true> receivers_; | 55 base::ObserverList<LogReceiver, true> receivers_; |
56 | 56 |
57 // Logs accumulated since the first receiver was registered. | 57 // Logs accumulated since the first receiver was registered. |
58 std::string accumulated_logs_; | 58 std::string accumulated_logs_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(LogRouter); | 60 DISALLOW_COPY_AND_ASSIGN(LogRouter); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace password_manager | 63 } // namespace password_manager |
64 | 64 |
65 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ | 65 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ |
OLD | NEW |