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

Side by Side Diff: net/base/sdch_manager.cc

Issue 935073003: Instrument SdchOwner for clock nullification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reset back to before URL inclusion. Created 5 years, 10 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 | net/sdch/sdch_owner.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/sdch_manager.h" 5 #include "net/base/sdch_manager.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SdchManager::SdchManager() { 252 SdchManager::SdchManager() {
253 DCHECK(thread_checker_.CalledOnValidThread()); 253 DCHECK(thread_checker_.CalledOnValidThread());
254 } 254 }
255 255
256 SdchManager::~SdchManager() { 256 SdchManager::~SdchManager() {
257 DCHECK(thread_checker_.CalledOnValidThread()); 257 DCHECK(thread_checker_.CalledOnValidThread());
258 while (!dictionaries_.empty()) { 258 while (!dictionaries_.empty()) {
259 auto it = dictionaries_.begin(); 259 auto it = dictionaries_.begin();
260 dictionaries_.erase(it->first); 260 dictionaries_.erase(it->first);
261 } 261 }
262 #if defined(OS_CHROMEOS)
263 // For debugging http://crbug.com/454198; remove when resolved.
264
265 // Explicitly confirm that we can't notify any observers anymore.
266 CHECK(!observers_.might_have_observers());
267 #endif
262 } 268 }
263 269
264 void SdchManager::ClearData() { 270 void SdchManager::ClearData() {
265 blacklisted_domains_.clear(); 271 blacklisted_domains_.clear();
266 allow_latency_experiment_.clear(); 272 allow_latency_experiment_.clear();
267 dictionaries_.clear(); 273 dictionaries_.clear();
268 FOR_EACH_OBSERVER(SdchObserver, observers_, OnClearDictionaries(this)); 274 FOR_EACH_OBSERVER(SdchObserver, observers_, OnClearDictionaries(this));
269 } 275 }
270 276
271 // static 277 // static
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 entry_dict->SetInteger("tries", it->second.count); 672 entry_dict->SetInteger("tries", it->second.count);
667 entry_dict->SetInteger("reason", it->second.reason); 673 entry_dict->SetInteger("reason", it->second.reason);
668 entry_list->Append(entry_dict); 674 entry_list->Append(entry_dict);
669 } 675 }
670 value->Set("blacklisted", entry_list); 676 value->Set("blacklisted", entry_list);
671 677
672 return value; 678 return value;
673 } 679 }
674 680
675 } // namespace net 681 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/sdch/sdch_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698