| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/dom_ui/options/browser_options_handler.h" | 5 #include "chrome/browser/dom_ui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 DictionaryValue* localized_strings) { | 45 DictionaryValue* localized_strings) { |
| 46 DCHECK(localized_strings); | 46 DCHECK(localized_strings); |
| 47 localized_strings->SetString("startupGroupName", | 47 localized_strings->SetString("startupGroupName", |
| 48 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_GROUP_NAME)); | 48 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_GROUP_NAME)); |
| 49 localized_strings->SetString("startupShowDefaultAndNewTab", | 49 localized_strings->SetString("startupShowDefaultAndNewTab", |
| 50 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB)); | 50 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB)); |
| 51 localized_strings->SetString("startupShowLastSession", | 51 localized_strings->SetString("startupShowLastSession", |
| 52 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION)); | 52 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION)); |
| 53 localized_strings->SetString("startupShowPages", | 53 localized_strings->SetString("startupShowPages", |
| 54 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_PAGES)); | 54 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_PAGES)); |
| 55 localized_strings->SetString("startupAddButton", | 55 localized_strings->SetString("startupShowManyPages", |
| 56 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_ADD_BUTTON)); | 56 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_MANY_PAGES)); |
| 57 localized_strings->SetString("startupRemoveButton", | |
| 58 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_REMOVE_BUTTON)); | |
| 59 localized_strings->SetString("startupUseCurrent", | 57 localized_strings->SetString("startupUseCurrent", |
| 60 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_USE_CURRENT)); | 58 l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_USE_CURRENT)); |
| 61 localized_strings->SetString("homepageGroupName", | 59 localized_strings->SetString("homepageGroupName", |
| 62 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_GROUP_NAME)); | 60 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_GROUP_NAME)); |
| 63 localized_strings->SetString("homepageUseNewTab", | 61 localized_strings->SetString("homepageUseNewTab", |
| 64 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB)); | 62 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB)); |
| 65 localized_strings->SetString("homepageUseURL", | 63 localized_strings->SetString("homepageUseURL", |
| 66 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_URL)); | 64 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_URL)); |
| 67 localized_strings->SetString("toolbarGroupName", | 65 localized_strings->SetString("toolbarGroupName", |
| 68 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_GROUP_NAME)); | 66 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_GROUP_NAME)); |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 349 } |
| 352 | 350 |
| 353 void BrowserOptionsHandler::SaveStartupPagesPref() { | 351 void BrowserOptionsHandler::SaveStartupPagesPref() { |
| 354 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); | 352 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); |
| 355 | 353 |
| 356 SessionStartupPref pref = SessionStartupPref::GetStartupPref(prefs); | 354 SessionStartupPref pref = SessionStartupPref::GetStartupPref(prefs); |
| 357 pref.urls = startup_custom_pages_table_model_->GetURLs(); | 355 pref.urls = startup_custom_pages_table_model_->GetURLs(); |
| 358 | 356 |
| 359 SessionStartupPref::SetStartupPref(prefs, pref); | 357 SessionStartupPref::SetStartupPref(prefs, pref); |
| 360 } | 358 } |
| OLD | NEW |