From e47ce49d31a0c712b0e64ed73bb3a74364fd51f6 Mon Sep 17 00:00:00 2001 From: "huanr@chromium.org" Date: Fri, 19 Mar 2010 18:58:37 +0000 Subject: Removing AddDefaultBookmark related code as we are taking bookmark import approach. BUG=32728 TEST=existing test passes Review URL: http://codereview.chromium.org/1122002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42130 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/util/master_preferences.cc | 4 ---- chrome/installer/util/master_preferences.h | 16 --------------- .../installer/util/master_preferences_unittest.cc | 24 ---------------------- 3 files changed, 44 deletions(-) (limited to 'chrome/installer/util') diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc index 0ac4e63..3cebf4b 100644 --- a/chrome/installer/util/master_preferences.cc +++ b/chrome/installer/util/master_preferences.cc @@ -129,10 +129,6 @@ std::vector GetFirstRunTabs(const DictionaryValue* prefs) { return GetNamedList(L"first_run_tabs", prefs); } -std::vector GetDefaultBookmarks(const DictionaryValue* prefs) { - return GetNamedList(L"default_bookmarks", prefs); -} - bool SetDistroBooleanPreference(DictionaryValue* prefs, const std::wstring& name, bool value) { diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h index 178587f..a6da339 100644 --- a/chrome/installer/util/master_preferences.h +++ b/chrome/installer/util/master_preferences.h @@ -147,22 +147,6 @@ DictionaryValue* ParseDistributionPreferences( // preferences file does not contain such list the vector is empty. std::vector GetFirstRunTabs(const DictionaryValue* prefs); -// As part of the master preferences an optional section indicates the -// pre-installed bookmarks. An example is the following: -// -// { -// "default_bookmarks": [ -// "http://google.com/b1", -// "https://google.com/b2" -// ] -// } -// -// Note that the entries need to be urls. -// -// This function retuns the list as a vector of GURLs. If the master -// preferences file does not contain such list the vector is empty. -std::vector GetDefaultBookmarks(const DictionaryValue* prefs); - // Sets the value of given boolean preference |name| in "distribution" // dictionary inside |prefs| dictionary. bool SetDistroBooleanPreference(DictionaryValue* prefs, diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc index 17ea387..3b7550a 100644 --- a/chrome/installer/util/master_preferences_unittest.cc +++ b/chrome/installer/util/master_preferences_unittest.cc @@ -209,30 +209,6 @@ TEST_F(MasterPreferencesTest, FirstRunTabs) { EXPECT_EQ(GURL("new_tab_page"), tabs[2]); } -TEST_F(MasterPreferencesTest, FirstRunBookMarks) { - const char text[] = - "{ \n" - " \"distribution\": { \n" - " \"something here\": true\n" - " },\n" - " \"default_bookmarks\": [\n" - " \"http://google.com/b1\",\n" - " \"https://google.com/b2\"\n" - " ]\n" - "} \n"; - - EXPECT_TRUE(file_util::WriteFile(prefs_file(), text, sizeof(text))); - scoped_ptr prefs( - installer_util::ParseDistributionPreferences(prefs_file())); - EXPECT_TRUE(prefs.get() != NULL); - - typedef std::vector BookmarksVector; - BookmarksVector bookmarks = installer_util::GetDefaultBookmarks(prefs.get()); - ASSERT_EQ(2, bookmarks.size()); - EXPECT_EQ(GURL("http://google.com/b1"), bookmarks[0]); - EXPECT_EQ(GURL("https://google.com/b2"), bookmarks[1]); -} - // In this test instead of using our synthetic json file, we use an // actual test case from the extensions unittest. The hope here is that if // they change something in the manifest this test will break, but in -- cgit v1.1