Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/utility/importer/importer_creator.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 #include "chrome/utility/importer/bookmarks_file_importer.h" | |
| 9 #include "chrome/utility/importer/firefox3_importer.h" | |
| 10 | |
| 11 #if defined(OS_WIN) | |
| 12 #include "chrome/utility/importer/ie_importer_win.h" | |
| 13 #endif | |
| 14 | |
| 15 #if defined(OS_MACOSX) | |
| 16 #include <CoreFoundation/CoreFoundation.h> | |
| 17 #include "base/mac/foundation_util.h" | |
|
gab
2013/07/10 13:40:44
I think we usually put an empty line between syste
scottmg
2013/07/15 16:06:01
Done.
| |
| 18 #include "chrome/utility/importer/safari_importer.h" | |
| 19 #endif | |
| 20 | |
| 21 namespace importer { | |
| 22 | |
| 23 Importer* CreateImporterByType(ImporterType type) { | |
| 24 switch (type) { | |
| 25 #if defined(OS_WIN) | |
| 26 case TYPE_IE: | |
| 27 return new IEImporter(); | |
| 28 #endif | |
| 29 case TYPE_BOOKMARKS_FILE: | |
| 30 return new BookmarksFileImporter(); | |
| 31 case TYPE_FIREFOX3: | |
| 32 return new Firefox3Importer(); | |
| 33 #if defined(OS_MACOSX) | |
| 34 case TYPE_SAFARI: | |
| 35 return new SafariImporter(base::mac::GetUserLibraryPath()); | |
| 36 #endif | |
| 37 default: | |
| 38 NOTREACHED(); | |
| 39 return NULL; | |
| 40 } | |
| 41 } | |
| 42 | |
| 43 } // namespace importer | |
| OLD | NEW |