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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_database_helper.cc

Issue 1438073002: Use std::tie for multi-member comparisons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style guide updates Created 5 years, 1 month 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 | chrome/browser/browsing_data/browsing_data_indexed_db_helper.cc » ('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 "chrome/browser/browsing_data/browsing_data_database_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
6 6
7 #include <tuple>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
13 #include "base/location.h" 14 #include "base/location.h"
14 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
15 #include "chrome/browser/browsing_data/browsing_data_helper.h" 16 #include "chrome/browser/browsing_data/browsing_data_helper.h"
16 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const std::string& description) 115 const std::string& description)
115 : origin(origin), 116 : origin(origin),
116 name(name), 117 name(name),
117 description(description) { 118 description(description) {
118 } 119 }
119 120
120 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::~PendingDatabaseInfo() {} 121 CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::~PendingDatabaseInfo() {}
121 122
122 bool CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::operator<( 123 bool CannedBrowsingDataDatabaseHelper::PendingDatabaseInfo::operator<(
123 const PendingDatabaseInfo& other) const { 124 const PendingDatabaseInfo& other) const {
124 if (origin == other.origin) 125 return std::tie(origin, name) < std::tie(other.origin, other.name);
125 return name < other.name;
126 return origin < other.origin;
127 } 126 }
128 127
129 CannedBrowsingDataDatabaseHelper::CannedBrowsingDataDatabaseHelper( 128 CannedBrowsingDataDatabaseHelper::CannedBrowsingDataDatabaseHelper(
130 Profile* profile) 129 Profile* profile)
131 : BrowsingDataDatabaseHelper(profile) { 130 : BrowsingDataDatabaseHelper(profile) {
132 } 131 }
133 132
134 void CannedBrowsingDataDatabaseHelper::AddDatabase( 133 void CannedBrowsingDataDatabaseHelper::AddDatabase(
135 const GURL& origin, 134 const GURL& origin,
136 const std::string& name, 135 const std::string& name,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 ++it) { 189 ++it) {
191 if (it->origin == origin && it->name == name) { 190 if (it->origin == origin && it->name == name) {
192 pending_database_info_.erase(it); 191 pending_database_info_.erase(it);
193 break; 192 break;
194 } 193 }
195 } 194 }
196 BrowsingDataDatabaseHelper::DeleteDatabase(origin_identifier, name); 195 BrowsingDataDatabaseHelper::DeleteDatabase(origin_identifier, name);
197 } 196 }
198 197
199 CannedBrowsingDataDatabaseHelper::~CannedBrowsingDataDatabaseHelper() {} 198 CannedBrowsingDataDatabaseHelper::~CannedBrowsingDataDatabaseHelper() {}
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_indexed_db_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698