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

Side by Side Diff: chrome/browser/history/url_index_private_data.cc

Issue 10382032: Coverity: Fix pass by value error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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/history/url_index_private_data.h" 5 #include "chrome/browser/history/url_index_private_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 #include <limits> 10 #include <limits>
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 map_entry->add_title_word_starts(*i); 1087 map_entry->add_title_word_starts(*i);
1088 } 1088 }
1089 } 1089 }
1090 1090
1091 // Cache Restoring ------------------------------------------------------------- 1091 // Cache Restoring -------------------------------------------------------------
1092 1092
1093 // static 1093 // static
1094 void URLIndexPrivateData::RestoreFromFileTask( 1094 void URLIndexPrivateData::RestoreFromFileTask(
1095 const FilePath& file_path, 1095 const FilePath& file_path,
1096 scoped_refptr<URLIndexPrivateData> private_data, 1096 scoped_refptr<URLIndexPrivateData> private_data,
1097 std::string languages) { 1097 const std::string& languages) {
1098 private_data = URLIndexPrivateData::RestoreFromFile(file_path, languages); 1098 private_data = URLIndexPrivateData::RestoreFromFile(file_path, languages);
1099 } 1099 }
1100 1100
1101 // static 1101 // static
1102 scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile( 1102 scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile(
1103 const FilePath& file_path, 1103 const FilePath& file_path,
1104 const std::string& languages) { 1104 const std::string& languages) {
1105 base::TimeTicks beginning_time = base::TimeTicks::Now(); 1105 base::TimeTicks beginning_time = base::TimeTicks::Now();
1106 if (!file_util::PathExists(file_path)) 1106 if (!file_util::PathExists(file_path))
1107 return NULL; 1107 return NULL;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 } 1344 }
1345 1345
1346 // static 1346 // static
1347 bool URLIndexPrivateData::URLSchemeIsWhitelisted( 1347 bool URLIndexPrivateData::URLSchemeIsWhitelisted(
1348 const GURL& gurl, 1348 const GURL& gurl,
1349 const std::set<std::string>& whitelist) { 1349 const std::set<std::string>& whitelist) {
1350 return whitelist.find(gurl.scheme()) != whitelist.end(); 1350 return whitelist.find(gurl.scheme()) != whitelist.end();
1351 } 1351 }
1352 1352
1353 } // namespace history 1353 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698