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

Unified Diff: chrome/browser/views/options/content_page_view.cc

Issue 160416: Add "Get Themes" button to gtk options dialog. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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/gtk/options/content_page_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/options/content_page_view.cc
===================================================================
--- chrome/browser/views/options/content_page_view.cc (revision 22090)
+++ chrome/browser/views/options/content_page_view.cc (working copy)
@@ -89,17 +89,9 @@
profile()->ClearTheme();
} else if (sender == themes_gallery_button_) {
UserMetricsRecordAction(L"Options_ThemesGallery", profile()->GetPrefs());
- Browser* browser =
- BrowserList::FindBrowserWithType(profile(), Browser::TYPE_NORMAL);
-
- if (!browser || !browser->GetSelectedTabContents()) {
- browser = Browser::Create(profile());
- browser->OpenURL(GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
- GURL(), NEW_WINDOW, PageTransition::LINK);
- } else {
- browser->AddTabWithURL(GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
- GURL(), PageTransition::LINK, true, -1, false, NULL);
- }
+ BrowserList::GetLastActive()->OpenURL(
+ GURL(l10n_util::GetString(IDS_THEMES_GALLERY_URL)),
+ GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK);
Evan Stade 2009/07/30 21:23:49 correct me if I'm wrong, but I believe this does e
} else if (sender == import_button_) {
views::Window::CreateChromeWindow(
GetWindow()->GetNativeWindow(),
« no previous file with comments | « chrome/browser/gtk/options/content_page_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698