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

Side by Side Diff: components/net_log/net_log_file_writer.cc

Issue 2850253002: Change chrome://net-export/ UI flow. (Closed)
Patch Set: one more HTML comment for consistency Created 3 years, 7 months 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
« no previous file with comments | « no previous file | components/net_log/resources/net_export.css » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "components/net_log/net_log_file_writer.h" 5 #include "components/net_log/net_log_file_writer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } else { 237 } else {
238 StopNetLogAfterAddNetInfo(std::move(polled_data)); 238 StopNetLogAfterAddNetInfo(std::move(polled_data));
239 } 239 }
240 } 240 }
241 241
242 std::unique_ptr<base::DictionaryValue> NetLogFileWriter::GetState() const { 242 std::unique_ptr<base::DictionaryValue> NetLogFileWriter::GetState() const {
243 DCHECK(thread_checker_.CalledOnValidThread()); 243 DCHECK(thread_checker_.CalledOnValidThread());
244 244
245 auto dict = base::MakeUnique<base::DictionaryValue>(); 245 auto dict = base::MakeUnique<base::DictionaryValue>();
246 246
247 #ifndef NDEBUG
248 dict->SetString("file", log_path_.LossyDisplayName()); 247 dict->SetString("file", log_path_.LossyDisplayName());
249 #endif // NDEBUG
250 248
251 base::StringPiece state_string; 249 base::StringPiece state_string;
252 switch (state_) { 250 switch (state_) {
253 case STATE_UNINITIALIZED: 251 case STATE_UNINITIALIZED:
254 state_string = "UNINITIALIZED"; 252 state_string = "UNINITIALIZED";
255 break; 253 break;
256 case STATE_INITIALIZING: 254 case STATE_INITIALIZING:
257 state_string = "INITIALIZING"; 255 state_string = "INITIALIZING";
258 break; 256 break;
259 case STATE_NOT_LOGGING: 257 case STATE_NOT_LOGGING:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 371
374 void NetLogFileWriter::ResetObserverThenSetStateNotLogging() { 372 void NetLogFileWriter::ResetObserverThenSetStateNotLogging() {
375 DCHECK(thread_checker_.CalledOnValidThread()); 373 DCHECK(thread_checker_.CalledOnValidThread());
376 file_net_log_observer_.reset(); 374 file_net_log_observer_.reset();
377 state_ = STATE_NOT_LOGGING; 375 state_ = STATE_NOT_LOGGING;
378 376
379 NotifyStateObservers(); 377 NotifyStateObservers();
380 } 378 }
381 379
382 } // namespace net_log 380 } // namespace net_log
OLDNEW
« no previous file with comments | « no previous file | components/net_log/resources/net_export.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698