| 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 <Cocoa/Cocoa.h> | 5 #include <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "chrome/utility/importer/safari_importer.h" | 7 #include "chrome/utility/importer/safari_importer.h" |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/mac/mac_util.h" | 13 #include "base/mac/mac_util.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/sys_string_conversions.h" | 15 #include "base/strings/sys_string_conversions.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "chrome/common/importer/imported_bookmark_entry.h" | 18 #include "chrome/common/importer/imported_bookmark_entry.h" |
| 19 #include "chrome/common/importer/imported_favicon_usage.h" | 19 #include "chrome/common/importer/imported_favicon_usage.h" |
| 20 #include "chrome/common/importer/importer_bridge.h" | 20 #include "chrome/common/importer/importer_bridge.h" |
| 21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
| 22 #include "chrome/grit/generated_resources.h" |
| 22 #include "chrome/utility/importer/favicon_reencode.h" | 23 #include "chrome/utility/importer/favicon_reencode.h" |
| 23 #include "components/strings/grit/components_strings.h" | 24 #include "components/strings/grit/components_strings.h" |
| 24 #include "chrome/grit/generated_resources.h" | |
| 25 #include "net/base/data_url.h" | 25 #include "net/base/data_url.h" |
| 26 #include "sql/statement.h" | 26 #include "sql/statement.h" |
| 27 #include "url/gurl.h" | 27 #include "url/gurl.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // A function like this is used by other importers in order to filter out | 31 // A function like this is used by other importers in order to filter out |
| 32 // URLS we don't want to import. | 32 // URLS we don't want to import. |
| 33 // For now it's pretty basic, but I've split it out so it's easy to slot | 33 // For now it's pretty basic, but I've split it out so it's easy to slot |
| 34 // in necessary logic for filtering URLS, should we need it. | 34 // in necessary logic for filtering URLS, should we need it. |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 if (!last_visit_str) | 373 if (!last_visit_str) |
| 374 continue; | 374 continue; |
| 375 | 375 |
| 376 // Convert Safari's last visit time to Unix Epoch time. | 376 // Convert Safari's last visit time to Unix Epoch time. |
| 377 double seconds_since_unix_epoch = HistoryTimeToEpochTime(last_visit_str); | 377 double seconds_since_unix_epoch = HistoryTimeToEpochTime(last_visit_str); |
| 378 row.last_visit = base::Time::FromDoubleT(seconds_since_unix_epoch); | 378 row.last_visit = base::Time::FromDoubleT(seconds_since_unix_epoch); |
| 379 | 379 |
| 380 history_items->push_back(row); | 380 history_items->push_back(row); |
| 381 } | 381 } |
| 382 } | 382 } |
| OLD | NEW |