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

Side by Side Diff: chrome/utility/importer/importer_creator.cc

Issue 1465853002: Implement support for importing favorites from Edge on Windows 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing include files Created 5 years 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
OLDNEW
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/importer_creator.h" 5 #include "chrome/utility/importer/importer_creator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/utility/importer/bookmarks_file_importer.h" 8 #include "chrome/utility/importer/bookmarks_file_importer.h"
9 #include "chrome/utility/importer/firefox_importer.h" 9 #include "chrome/utility/importer/firefox_importer.h"
10 10
11 #if defined(OS_WIN) 11 #if defined(OS_WIN)
12 #include "chrome/common/importer/edge_importer_utils_win.h"
13 #include "chrome/utility/importer/edge_importer_win.h"
12 #include "chrome/utility/importer/ie_importer_win.h" 14 #include "chrome/utility/importer/ie_importer_win.h"
13 #endif 15 #endif
14 16
15 #if defined(OS_MACOSX) 17 #if defined(OS_MACOSX)
16 #include <CoreFoundation/CoreFoundation.h> 18 #include <CoreFoundation/CoreFoundation.h>
17 19
18 #include "base/mac/foundation_util.h" 20 #include "base/mac/foundation_util.h"
19 #include "chrome/utility/importer/safari_importer.h" 21 #include "chrome/utility/importer/safari_importer.h"
20 #endif 22 #endif
21 23
22 namespace importer { 24 namespace importer {
23 25
24 Importer* CreateImporterByType(ImporterType type) { 26 Importer* CreateImporterByType(ImporterType type) {
25 switch (type) { 27 switch (type) {
26 #if defined(OS_WIN) 28 #if defined(OS_WIN)
27 case TYPE_IE: 29 case TYPE_IE:
28 return new IEImporter(); 30 return new IEImporter();
31 case TYPE_EDGE:
32 // If legacy mode we pass back an IE importer.
33 if (IsEdgeFavoritesLegacyMode())
34 return new IEImporter();
35 return new EdgeImporter();
29 #endif 36 #endif
30 case TYPE_BOOKMARKS_FILE: 37 case TYPE_BOOKMARKS_FILE:
31 return new BookmarksFileImporter(); 38 return new BookmarksFileImporter();
32 case TYPE_FIREFOX: 39 case TYPE_FIREFOX:
33 return new FirefoxImporter(); 40 return new FirefoxImporter();
34 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
35 case TYPE_SAFARI: 42 case TYPE_SAFARI:
36 return new SafariImporter(base::mac::GetUserLibraryPath()); 43 return new SafariImporter(base::mac::GetUserLibraryPath());
37 #endif 44 #endif
38 default: 45 default:
39 NOTREACHED(); 46 NOTREACHED();
40 return NULL; 47 return NULL;
41 } 48 }
42 } 49 }
43 50
44 } // namespace importer 51 } // namespace importer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698