Chromium Code Reviews| Index: chrome/browser/importer/importer_list.cc |
| diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc |
| index de8987d0024e3dba4b304b1c1374937102cbe8dc..ca2292ce9d802ee45967a31463e6b3dbe8435557 100644 |
| --- a/chrome/browser/importer/importer_list.cc |
| +++ b/chrome/browser/importer/importer_list.cc |
| @@ -20,6 +20,10 @@ |
| #include "chrome/common/importer/safari_importer_utils.h" |
| #endif |
| +#if defined(OS_WIN) |
| +#include "chrome/common/importer/edge_importer_utils_win.h" |
| +#endif |
| + |
| using content::BrowserThread; |
| namespace { |
| @@ -37,6 +41,25 @@ void DetectIEProfiles(std::vector<importer::SourceProfile*>* profiles) { |
| importer::COOKIES | importer::PASSWORDS | importer::SEARCH_ENGINES; |
| profiles->push_back(ie); |
| } |
| + |
| +void DetectEdgeProfiles(std::vector<importer::SourceProfile*>* profiles) { |
| + importer::SourceProfile* edge = new importer::SourceProfile; |
|
Ilya Sherman
2015/11/26 02:04:43
Hrm. Not as part of this CL, but if you have time
forshaw
2015/11/30 12:57:57
Will look at it, does seem pretty nasty.
|
| + edge->importer_name = l10n_util::GetStringUTF16(IDS_IMPORT_FROM_EDGE); |
| + edge->importer_type = importer::TYPE_EDGE; |
| + edge->source_path.clear(); |
| + edge->app_path.clear(); |
|
Ilya Sherman
2015/11/26 02:04:43
These two lines don't do anything -- right? I do
forshaw
2015/11/30 12:57:57
Nope probably not, just copied again from above.
|
| + edge->services_supported = importer::FAVORITES; |
| + profiles->push_back(edge); |
| +} |
| + |
| +void DetectBuiltinWindowsProfiles( |
| + std::vector<importer::SourceProfile*>* profiles) { |
| + // Make the assumption on Windows 10 that Edge exists and is probably default. |
| + if (importer::EdgeImporterCanImport()) |
| + DetectEdgeProfiles(profiles); |
| + DetectIEProfiles(profiles); |
| +} |
| + |
| #endif // defined(OS_WIN) |
| #if defined(OS_MACOSX) |
| @@ -111,9 +134,9 @@ std::vector<importer::SourceProfile*> DetectSourceProfilesWorker( |
| #if defined(OS_WIN) |
| if (ShellIntegration::IsFirefoxDefaultBrowser()) { |
| DetectFirefoxProfiles(locale, &profiles); |
| - DetectIEProfiles(&profiles); |
| + DetectBuiltinWindowsProfiles(&profiles); |
| } else { |
| - DetectIEProfiles(&profiles); |
| + DetectBuiltinWindowsProfiles(&profiles); |
| DetectFirefoxProfiles(locale, &profiles); |
| } |
| #elif defined(OS_MACOSX) |