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

Side by Side Diff: net/disk_cache/simple/simple_index.cc

Issue 1869503003: Convert //net and //chromecast to std::unordered_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cast Created 4 years, 8 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
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 "net/disk_cache/simple/simple_index.h" 5 #include "net/disk_cache/simple/simple_index.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 (*it)->second.SetEntrySize(entry_size); 394 (*it)->second.SetEntrySize(entry_size);
395 } 395 }
396 396
397 void SimpleIndex::MergeInitializingSet( 397 void SimpleIndex::MergeInitializingSet(
398 scoped_ptr<SimpleIndexLoadResult> load_result) { 398 scoped_ptr<SimpleIndexLoadResult> load_result) {
399 DCHECK(io_thread_checker_.CalledOnValidThread()); 399 DCHECK(io_thread_checker_.CalledOnValidThread());
400 DCHECK(load_result->did_load); 400 DCHECK(load_result->did_load);
401 401
402 EntrySet* index_file_entries = &load_result->entries; 402 EntrySet* index_file_entries = &load_result->entries;
403 403
404 for (base::hash_set<uint64_t>::const_iterator it = removed_entries_.begin(); 404 for (std::unordered_set<uint64_t>::const_iterator it =
405 removed_entries_.begin();
405 it != removed_entries_.end(); ++it) { 406 it != removed_entries_.end(); ++it) {
406 index_file_entries->erase(*it); 407 index_file_entries->erase(*it);
407 } 408 }
408 removed_entries_.clear(); 409 removed_entries_.clear();
409 410
410 for (EntrySet::const_iterator it = entries_set_.begin(); 411 for (EntrySet::const_iterator it = entries_set_.begin();
411 it != entries_set_.end(); ++it) { 412 it != entries_set_.end(); ++it) {
412 const uint64_t entry_hash = it->first; 413 const uint64_t entry_hash = it->first;
413 std::pair<EntrySet::iterator, bool> insert_result = 414 std::pair<EntrySet::iterator, bool> insert_result =
414 index_file_entries->insert(EntrySet::value_type(entry_hash, 415 index_file_entries->insert(EntrySet::value_type(entry_hash,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 start - last_write_to_disk_); 480 start - last_write_to_disk_);
480 } 481 }
481 } 482 }
482 last_write_to_disk_ = start; 483 last_write_to_disk_ = start;
483 484
484 index_file_->WriteToDisk(entries_set_, cache_size_, 485 index_file_->WriteToDisk(entries_set_, cache_size_,
485 start, app_on_background_, base::Closure()); 486 start, app_on_background_, base::Closure());
486 } 487 }
487 488
488 } // namespace disk_cache 489 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698