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

Side by Side Diff: storage/browser/quota/quota_manager.cc

Issue 2581733002: Fix tautological comparison and add clang flag (Closed)
Patch Set: Remove clang warnings only when using clang Created 4 years 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 | « build/config/clang/BUILD.gn ('k') | third_party/openh264/BUILD.gn » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "storage/browser/quota/quota_manager.h" 5 #include "storage/browser/quota/quota_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const char QuotaManager::kTimeBetweenRepeatedOriginEvictionsHistogram[] = 74 const char QuotaManager::kTimeBetweenRepeatedOriginEvictionsHistogram[] =
75 "Quota.TimeBetweenRepeatedOriginEvictions"; 75 "Quota.TimeBetweenRepeatedOriginEvictions";
76 const char QuotaManager::kEvictedOriginAccessedCountHistogram[] = 76 const char QuotaManager::kEvictedOriginAccessedCountHistogram[] =
77 "Quota.EvictedOriginAccessCount"; 77 "Quota.EvictedOriginAccessCount";
78 const char QuotaManager::kEvictedOriginTimeSinceAccessHistogram[] = 78 const char QuotaManager::kEvictedOriginTimeSinceAccessHistogram[] =
79 "Quota.EvictedOriginTimeSinceAccess"; 79 "Quota.EvictedOriginTimeSinceAccess";
80 80
81 namespace { 81 namespace {
82 82
83 bool IsSupportedType(StorageType type) { 83 bool IsSupportedType(StorageType type) {
84 return type != kStorageTypeTemporary || type != kStorageTypePersistent || 84 return type == kStorageTypeTemporary || type == kStorageTypePersistent ||
85 type != kStorageTypeSyncable; 85 type == kStorageTypeSyncable;
86 } 86 }
87 87
88 bool IsSupportedIncognitoType(StorageType type) { 88 bool IsSupportedIncognitoType(StorageType type) {
89 return type != kStorageTypeTemporary || type != kStorageTypePersistent; 89 return type == kStorageTypeTemporary || type == kStorageTypePersistent;
90 } 90 }
91 91
92 void CountOriginType(const std::set<GURL>& origins, 92 void CountOriginType(const std::set<GURL>& origins,
93 SpecialStoragePolicy* policy, 93 SpecialStoragePolicy* policy,
94 size_t* protected_origins, 94 size_t* protected_origins,
95 size_t* unlimited_origins) { 95 size_t* unlimited_origins) {
96 DCHECK(protected_origins); 96 DCHECK(protected_origins);
97 DCHECK(unlimited_origins); 97 DCHECK(unlimited_origins);
98 *protected_origins = 0; 98 *protected_origins = 0;
99 *unlimited_origins = 0; 99 *unlimited_origins = 0;
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 } 1658 }
1659 1659
1660 // static 1660 // static
1661 std::pair<int64_t, int64_t> QuotaManager::GetVolumeInfo( 1661 std::pair<int64_t, int64_t> QuotaManager::GetVolumeInfo(
1662 const base::FilePath& path) { 1662 const base::FilePath& path) {
1663 return std::make_pair(base::SysInfo::AmountOfTotalDiskSpace(path), 1663 return std::make_pair(base::SysInfo::AmountOfTotalDiskSpace(path),
1664 base::SysInfo::AmountOfFreeDiskSpace(path)); 1664 base::SysInfo::AmountOfFreeDiskSpace(path));
1665 } 1665 }
1666 1666
1667 } // namespace storage 1667 } // namespace storage
OLDNEW
« no previous file with comments | « build/config/clang/BUILD.gn ('k') | third_party/openh264/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698