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

Side by Side Diff: content/browser/indexed_db/indexed_db_active_blob_registry_unittest.cc

Issue 2119283002: Use container::back() and container::pop_back() for content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/test/test_simple_task_runner.h" 10 #include "base/test/test_simple_task_runner.h"
(...skipping 23 matching lines...) Expand all
34 } else { 34 } else {
35 if (!origins_.count(origin)) { 35 if (!origins_.count(origin)) {
36 duplicate_calls_ = true; 36 duplicate_calls_ = true;
37 } else { 37 } else {
38 origins_.erase(origin); 38 origins_.erase(origin);
39 } 39 }
40 } 40 }
41 } 41 }
42 42
43 bool CheckNoOriginsInUse() const { 43 bool CheckNoOriginsInUse() const {
44 return !duplicate_calls_ && !origins_.size(); 44 return !duplicate_calls_ && origins_.empty();
45 } 45 }
46 46
47 bool CheckSingleOriginInUse(const url::Origin& origin) const { 47 bool CheckSingleOriginInUse(const url::Origin& origin) const {
48 return !duplicate_calls_ && origins_.size() == 1 && origins_.count(origin); 48 return !duplicate_calls_ && origins_.size() == 1 && origins_.count(origin);
49 } 49 }
50 50
51 private: 51 private:
52 ~RegistryTestMockFactory() override {} 52 ~RegistryTestMockFactory() override {}
53 53
54 std::set<url::Origin> origins_; 54 std::set<url::Origin> origins_;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 RunUntilIdle(); 272 RunUntilIdle();
273 273
274 // Nothing changes. 274 // Nothing changes.
275 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin())); 275 EXPECT_TRUE(factory()->CheckSingleOriginInUse(backing_store()->origin()));
276 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty()); 276 EXPECT_TRUE(backing_store()->CheckUnusedBlobsEmpty());
277 } 277 }
278 278
279 } // namespace 279 } // namespace
280 280
281 } // namespace content 281 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_internals_ui.cc ('k') | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698