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

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: Addressed review comments. 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
« no previous file with comments | « chrome/browser/history/url_index_private_data.h ('k') | no next file » | 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/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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 map_entry->add_title_word_starts(*i); 1088 map_entry->add_title_word_starts(*i);
1089 } 1089 }
1090 } 1090 }
1091 1091
1092 // Cache Restoring ------------------------------------------------------------- 1092 // Cache Restoring -------------------------------------------------------------
1093 1093
1094 // static 1094 // static
1095 void URLIndexPrivateData::RestoreFromFileTask( 1095 void URLIndexPrivateData::RestoreFromFileTask(
1096 const FilePath& file_path, 1096 const FilePath& file_path,
1097 scoped_refptr<URLIndexPrivateData> private_data, 1097 scoped_refptr<URLIndexPrivateData> private_data,
1098 std::string languages) { 1098 const std::string& languages) {
1099 private_data = URLIndexPrivateData::RestoreFromFile(file_path, languages); 1099 private_data = URLIndexPrivateData::RestoreFromFile(file_path, languages);
1100 } 1100 }
1101 1101
1102 // static 1102 // static
1103 scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile( 1103 scoped_refptr<URLIndexPrivateData> URLIndexPrivateData::RestoreFromFile(
1104 const FilePath& file_path, 1104 const FilePath& file_path,
1105 const std::string& languages) { 1105 const std::string& languages) {
1106 base::TimeTicks beginning_time = base::TimeTicks::Now(); 1106 base::TimeTicks beginning_time = base::TimeTicks::Now();
1107 if (!file_util::PathExists(file_path)) 1107 if (!file_util::PathExists(file_path))
1108 return NULL; 1108 return NULL;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 } 1345 }
1346 1346
1347 // static 1347 // static
1348 bool URLIndexPrivateData::URLSchemeIsWhitelisted( 1348 bool URLIndexPrivateData::URLSchemeIsWhitelisted(
1349 const GURL& gurl, 1349 const GURL& gurl,
1350 const std::set<std::string>& whitelist) { 1350 const std::set<std::string>& whitelist) {
1351 return whitelist.find(gurl.scheme()) != whitelist.end(); 1351 return whitelist.find(gurl.scheme()) != whitelist.end();
1352 } 1352 }
1353 1353
1354 } // namespace history 1354 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/url_index_private_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698