| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |