diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 00:33:09 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 00:33:09 +0000 |
commit | ec45150a89bb02e1f9c4ab159924af22b4952b33 (patch) | |
tree | ac3ee979cb2f8116450275186b99efedca6afe52 /chrome/browser/importer/safari_importer.mm | |
parent | 0888e85c007b3b88167753654769a8e3129d0fbb (diff) | |
download | chromium_src-ec45150a89bb02e1f9c4ab159924af22b4952b33.zip chromium_src-ec45150a89bb02e1f9c4ab159924af22b4952b33.tar.gz chromium_src-ec45150a89bb02e1f9c4ab159924af22b4952b33.tar.bz2 |
Mac: remove some now-dead code and add a comment.
I slightly jumped the gun on committing CL 328010, and this patch does some things requested in a review.
BUG=23825
TEST=none
Review URL: http://codereview.chromium.org/326024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/safari_importer.mm')
-rw-r--r-- | chrome/browser/importer/safari_importer.mm | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/chrome/browser/importer/safari_importer.mm b/chrome/browser/importer/safari_importer.mm index 0dace3b2..18d6ae3 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); - } -} |