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

Unified Diff: chrome/browser/importer/safari_importer.mm

Issue 326024: Mac: remove some now-dead code and add a comment. (Closed)
Patch Set: Further changes as requested by Jeremy. Created 11 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/importer/safari_importer.h ('k') | chrome/browser/importer/safari_importer_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/safari_importer.mm
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm
index 0dace3b27bee0720f34cd45d071aedbf86d4f1e3..18d6ae38055d9b142e7e9ead5aeed5779023c0cc 100644
--- a/chrome/browser/importer/safari_importer.mm
+++ b/chrome/browser/importer/safari_importer.mm
@@ -53,9 +53,8 @@ bool SafariImporter::CanImport(const FilePath& library_dir,
*services_supported = NONE;
// Import features are toggled by the following:
- // bookmarks import: existance of ~/Library/Safari/Bookmarks.plist file.
- // history import: existance of ~/Library/Safari/History.plist file.
- // homepage import: existance of appropriate key in defaults.
+ // bookmarks import: existence of ~/Library/Safari/Bookmarks.plist file.
+ // history import: existence of ~/Library/Safari/History.plist file.
FilePath safari_dir = library_dir.Append("Safari");
FilePath bookmarks_path = safari_dir.Append("Bookmarks.plist");
FilePath history_path = safari_dir.Append("History.plist");
@@ -66,13 +65,6 @@ bool SafariImporter::CanImport(const FilePath& library_dir,
if (PathExists(history_path))
*services_supported |= HISTORY;
- const scoped_nsobject<NSString> homepage_ns(
- reinterpret_cast<const NSString*>(
- CFPreferencesCopyAppValue(CFSTR("HomePage"),
- CFSTR("com.apple.Safari"))));
- if (homepage_ns.get())
- *services_supported |= HOME_PAGE;
-
return *services_supported != NONE;
}
@@ -84,7 +76,8 @@ void SafariImporter::StartImport(ProfileInfo profile_info,
// The order here is important!
bridge_->NotifyStarted();
// In keeping with import on other platforms (and for other browsers), we
- // don't import the home page (since it may lead to a useless homepage).
+ // don't import the home page (since it may lead to a useless homepage); see
+ // crbug.com/25603.
if ((services_supported & HISTORY) && !cancelled()) {
bridge_->NotifyItemStarted(HISTORY);
ImportHistory();
@@ -393,18 +386,3 @@ void SafariImporter::ParseHistoryItems(
history_items->push_back(row);
}
}
-
-void SafariImporter::ImportHomepage() {
- const scoped_nsobject<NSString> homepage_ns(
- reinterpret_cast<const NSString*>(
- CFPreferencesCopyAppValue(CFSTR("HomePage"),
- CFSTR("com.apple.Safari"))));
- if (!homepage_ns.get())
- return;
-
- string16 hompeage_str = base::SysNSStringToUTF16(homepage_ns.get());
- GURL homepage(hompeage_str);
- if (homepage.is_valid()) {
- bridge_->AddHomePage(homepage);
- }
-}
« no previous file with comments | « chrome/browser/importer/safari_importer.h ('k') | chrome/browser/importer/safari_importer_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698