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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 5005: Reorganize the declarations to have some grouping and logical ordering in tab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/new_tab_ui.h" 5 #include "chrome/browser/dom_ui/new_tab_ui.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/string_piece.h" 8 #include "base/string_piece.h"
9 #include "chrome/app/locales/locale_settings.h" 9 #include "chrome/app/locales/locale_settings.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 url += ":"; 736 url += ":";
737 return GURL(url); 737 return GURL(url);
738 } 738 }
739 739
740 NewTabUIContents::NewTabUIContents(Profile* profile, 740 NewTabUIContents::NewTabUIContents(Profile* profile,
741 SiteInstance* instance, RenderViewHostFactory* render_view_factory) : 741 SiteInstance* instance, RenderViewHostFactory* render_view_factory) :
742 DOMUIHost(profile, instance, render_view_factory), 742 DOMUIHost(profile, instance, render_view_factory),
743 motd_message_id_(0), 743 motd_message_id_(0),
744 incognito_(false), 744 incognito_(false),
745 most_visited_handler_(NULL) { 745 most_visited_handler_(NULL) {
746 type_ = TAB_CONTENTS_NEW_TAB_UI; 746 set_type(TAB_CONTENTS_NEW_TAB_UI);
747 set_forced_title(l10n_util::GetString(IDS_NEW_TAB_TITLE)); 747 set_forced_title(l10n_util::GetString(IDS_NEW_TAB_TITLE));
748 748
749 if (profile->IsOffTheRecord()) 749 if (profile->IsOffTheRecord())
750 incognito_ = true; 750 incognito_ = true;
751 751
752 if (NewTabHTMLSource::first_view() && 752 if (NewTabHTMLSource::first_view() &&
753 (profile->GetPrefs()->GetInteger(prefs::kRestoreOnStartup) != 0 || 753 (profile->GetPrefs()->GetInteger(prefs::kRestoreOnStartup) != 0 ||
754 !profile->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage)) 754 !profile->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage))
755 ) { 755 ) {
756 NewTabHTMLSource::set_first_view(false); 756 NewTabHTMLSource::set_first_view(false);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 for (size_t i = 0; i < urls.size(); ++i) { 843 for (size_t i = 0; i < urls.size(); ++i) {
844 if (url == urls[i]) { 844 if (url == urls[i]) {
845 UserMetrics::RecordComputedAction(StringPrintf(L"MostVisited%d", i), 845 UserMetrics::RecordComputedAction(StringPrintf(L"MostVisited%d", i),
846 profile()); 846 profile());
847 break; 847 break;
848 } 848 }
849 } 849 }
850 } 850 }
851 } 851 }
852 852
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/html_dialog_contents.cc ('k') | chrome/browser/encoding_menu_controller_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698