| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/utility/importer/firefox_importer.h" | 5 #include "chrome/utility/importer/firefox_importer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| 11 #include "base/json/json_file_value_serializer.h" | 11 #include "base/json/json_file_value_serializer.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "chrome/common/importer/firefox_importer_utils.h" | 17 #include "chrome/common/importer/firefox_importer_utils.h" |
| 18 #include "chrome/common/importer/firefox_importer_utils.h" | 18 #include "chrome/common/importer/firefox_importer_utils.h" |
| 19 #include "chrome/common/importer/imported_bookmark_entry.h" | 19 #include "chrome/common/importer/imported_bookmark_entry.h" |
| 20 #include "chrome/common/importer/imported_favicon_usage.h" | 20 #include "chrome/common/importer/imported_favicon_usage.h" |
| 21 #include "chrome/common/importer/importer_bridge.h" | 21 #include "chrome/common/importer/importer_bridge.h" |
| 22 #include "chrome/common/importer/importer_url_row.h" | 22 #include "chrome/common/importer/importer_url_row.h" |
| 23 #include "chrome/grit/generated_resources.h" |
| 23 #include "chrome/utility/importer/bookmark_html_reader.h" | 24 #include "chrome/utility/importer/bookmark_html_reader.h" |
| 24 #include "chrome/utility/importer/favicon_reencode.h" | 25 #include "chrome/utility/importer/favicon_reencode.h" |
| 25 #include "chrome/utility/importer/nss_decryptor.h" | 26 #include "chrome/utility/importer/nss_decryptor.h" |
| 26 #include "components/autofill/core/common/password_form.h" | 27 #include "components/autofill/core/common/password_form.h" |
| 27 #include "grit/generated_resources.h" | |
| 28 #include "sql/connection.h" | 28 #include "sql/connection.h" |
| 29 #include "sql/statement.h" | 29 #include "sql/statement.h" |
| 30 #include "url/gurl.h" | 30 #include "url/gurl.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Original definition is in http://mxr.mozilla.org/firefox/source/toolkit/ | 34 // Original definition is in http://mxr.mozilla.org/firefox/source/toolkit/ |
| 35 // components/places/public/nsINavBookmarksService.idl | 35 // components/places/public/nsINavBookmarksService.idl |
| 36 enum BookmarkItemType { | 36 enum BookmarkItemType { |
| 37 TYPE_BOOKMARK = 1, | 37 TYPE_BOOKMARK = 1, |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 | 697 |
| 698 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) | 698 if (!importer::ReencodeFavicon(&data[0], data.size(), &usage.png_data)) |
| 699 continue; // Unable to decode. | 699 continue; // Unable to decode. |
| 700 | 700 |
| 701 usage.urls = i->second; | 701 usage.urls = i->second; |
| 702 favicons->push_back(usage); | 702 favicons->push_back(usage); |
| 703 } | 703 } |
| 704 s.Reset(true); | 704 s.Reset(true); |
| 705 } | 705 } |
| 706 } | 706 } |
| OLD | NEW |