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

Side by Side Diff: chrome/browser/dom_ui/options/browser_options_handler.cc

Issue 4245002: Add instant to tabbed options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: smorgan review Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/string_number_conversions.h" 11 #include "base/string_number_conversions.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/browser_thread.h" 14 #include "chrome/browser/browser_thread.h"
15 #include "chrome/browser/custom_home_pages_table_model.h" 15 #include "chrome/browser/custom_home_pages_table_model.h"
16 #include "chrome/browser/dom_ui/dom_ui_favicon_source.h" 16 #include "chrome/browser/dom_ui/dom_ui_favicon_source.h"
17 #include "chrome/browser/dom_ui/options/options_managed_banner_handler.h" 17 #include "chrome/browser/dom_ui/options/options_managed_banner_handler.h"
18 #include "chrome/browser/instant/instant_confirm_dialog.h"
18 #include "chrome/browser/metrics/user_metrics.h" 19 #include "chrome/browser/metrics/user_metrics.h"
19 #include "chrome/browser/net/url_fixer_upper.h" 20 #include "chrome/browser/net/url_fixer_upper.h"
20 #include "chrome/browser/options_window.h" 21 #include "chrome/browser/options_window.h"
21 #include "chrome/browser/prefs/session_startup_pref.h" 22 #include "chrome/browser/prefs/session_startup_pref.h"
22 #include "chrome/browser/profile.h" 23 #include "chrome/browser/profile.h"
23 #include "chrome/browser/search_engines/template_url.h" 24 #include "chrome/browser/search_engines/template_url.h"
24 #include "chrome/browser/search_engines/template_url_model.h" 25 #include "chrome/browser/search_engines/template_url_model.h"
25 #include "chrome/installer/util/browser_distribution.h" 26 #include "chrome/installer/util/browser_distribution.h"
26 #include "grit/chromium_strings.h" 27 #include "grit/chromium_strings.h"
27 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 localized_strings->SetString("homepageUseURL", 65 localized_strings->SetString("homepageUseURL",
65 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_URL)); 66 l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_URL));
66 localized_strings->SetString("toolbarGroupName", 67 localized_strings->SetString("toolbarGroupName",
67 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_GROUP_NAME)); 68 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_GROUP_NAME));
68 localized_strings->SetString("toolbarShowHomeButton", 69 localized_strings->SetString("toolbarShowHomeButton",
69 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON)); 70 l10n_util::GetStringUTF16(IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON));
70 localized_strings->SetString("defaultSearchGroupName", 71 localized_strings->SetString("defaultSearchGroupName",
71 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME)); 72 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME));
72 localized_strings->SetString("defaultSearchManageEnginesLink", 73 localized_strings->SetString("defaultSearchManageEnginesLink",
73 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES_LINK)); 74 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES_LINK));
75 localized_strings->SetString("instantName",
76 l10n_util::GetStringUTF16(IDS_INSTANT_PREF));
77 localized_strings->SetString("instantWarningText",
78 l10n_util::GetStringUTF16(IDS_INSTANT_PREF_WARNING));
79 localized_strings->SetString("instantLearnMoreLink",
80 ASCIIToUTF16(browser::kInstantLearnMoreURL));
74 localized_strings->SetString("defaultBrowserGroupName", 81 localized_strings->SetString("defaultBrowserGroupName",
75 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME)); 82 l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME));
76 localized_strings->SetString("defaultBrowserUnknown", 83 localized_strings->SetString("defaultBrowserUnknown",
77 l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN, 84 l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN,
78 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 85 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
79 localized_strings->SetString("defaultBrowserUseAsDefault", 86 localized_strings->SetString("defaultBrowserUseAsDefault",
80 l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT, 87 l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT,
81 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 88 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
82 } 89 }
83 90
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 343 }
337 344
338 void BrowserOptionsHandler::SaveStartupPagesPref() { 345 void BrowserOptionsHandler::SaveStartupPagesPref() {
339 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); 346 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs();
340 347
341 SessionStartupPref pref = SessionStartupPref::GetStartupPref(prefs); 348 SessionStartupPref pref = SessionStartupPref::GetStartupPref(prefs);
342 pref.urls = startup_custom_pages_table_model_->GetURLs(); 349 pref.urls = startup_custom_pages_table_model_->GetURLs();
343 350
344 SessionStartupPref::SetStartupPref(prefs, pref); 351 SessionStartupPref::SetStartupPref(prefs, pref);
345 } 352 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/advanced_options_handler.cc ('k') | chrome/browser/resources/dom_ui.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698