Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 private: | 53 private: |
| 54 // Observer lists for clients and receivers. The |true| in the template | 54 // Observer lists for clients and receivers. The |true| in the template |
| 55 // specialisation means that they will check that all observers were removed | 55 // specialisation means that they will check that all observers were removed |
| 56 // on destruction. | 56 // on destruction. |
| 57 ObserverList<PasswordManagerClient, true> clients_; | 57 ObserverList<PasswordManagerClient, true> clients_; |
| 58 ObserverList<PasswordManagerLogger, true> receivers_; | 58 ObserverList<PasswordManagerLogger, true> receivers_; |
| 59 | 59 |
| 60 // Logs accumulated since the first receiver was registered. | 60 // Logs accumulated since the first receiver was registered. |
| 61 std::string accumulated_logs_; | 61 std::string accumulated_logs_; |
| 62 | 62 |
| 63 #if !defined(NDEBUG) | |
| 64 // Only notify observes from |receivers_| if this is set to true. It will be | |
|
Ilya Sherman
2014/05/13 04:32:18
nit: "observes" -> "observers"
vabr (Chromium)
2014/05/13 09:27:11
Gone -> done. :)
| |
| 65 // set to false during adding a new receiver, because that might have been | |
| 66 // triggered from the receiver's constructor, and it's not a good idea to use | |
| 67 // classes which did not finish constructing themselves. | |
| 68 bool can_use_receivers_; | |
| 69 #endif | |
|
Ilya Sherman
2014/05/13 04:32:18
Hmm, why is this code debug-only?
vabr (Chromium)
2014/05/13 09:27:11
I was overzealous with trying to slim down the rel
| |
| 70 | |
| 63 DISALLOW_COPY_AND_ASSIGN(LogRouter); | 71 DISALLOW_COPY_AND_ASSIGN(LogRouter); |
| 64 }; | 72 }; |
| 65 | 73 |
| 66 } // namespace password_manager | 74 } // namespace password_manager |
| 67 | 75 |
| 68 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ | 76 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LOG_ROUTER_H_ |
| OLD | NEW |