Chromium Code Reviews| Index: chrome/browser/net/chrome_net_log.cc |
| =================================================================== |
| --- chrome/browser/net/chrome_net_log.cc (revision 177284) |
| +++ chrome/browser/net/chrome_net_log.cc (working copy) |
| @@ -11,13 +11,15 @@ |
| #include "base/values.h" |
| #include "chrome/browser/net/load_timing_observer.h" |
| #include "chrome/browser/net/net_log_logger.h" |
| +#include "chrome/browser/net/net_log_temp_file.h" |
| #include "chrome/common/chrome_switches.h" |
| ChromeNetLog::ChromeNetLog() |
| : last_id_(0), |
| base_log_level_(LOG_BASIC), |
| effective_log_level_(LOG_BASIC), |
| - load_timing_observer_(new LoadTimingObserver()) { |
| + load_timing_observer_(new LoadTimingObserver()), |
| + net_log_temp_file_(new NetLogTempFile(this)) { |
| const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| // Adjust base log level based on command line switch, if present. |
| // This is done before adding any observers so the call to UpdateLogLevel when |
| @@ -43,6 +45,7 @@ |
| } |
| ChromeNetLog::~ChromeNetLog() { |
| + net_log_temp_file_.reset(); |
|
mmenke
2013/01/18 15:58:00
Think we should have the temp file stop watching t
mmenke
2013/01/18 15:58:00
Also, there's no need to delete this. Just need t
ramant (doing other things)
2013/01/18 23:22:33
We do the above in NetLogTempFile::~NetLogTempFile
|
| // Remove the observers we own before we're destroyed. |
| RemoveThreadSafeObserver(load_timing_observer_.get()); |
| if (net_log_logger_.get()) |