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

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

Issue 2805089: Add bookmark promo to NTP on first run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); 1920 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true);
1921 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); 1921 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0);
1922 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); 1922 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true);
1923 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true); 1923 prefs->RegisterBooleanPref(prefs::kShowOmniboxSearchHint, true);
1924 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true); 1924 prefs->RegisterBooleanPref(prefs::kShowExtensionShelf, true);
1925 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true); 1925 prefs->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
1926 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); 1926 prefs->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
1927 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); 1927 prefs->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
1928 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false); 1928 prefs->RegisterBooleanPref(prefs::kUseVerticalTabs, false);
1929 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true); 1929 prefs->RegisterBooleanPref(prefs::kEnableTranslate, true);
1930 prefs->RegisterIntegerPref(prefs::kNTPPromoViewsRemaining, 5);
1930 } 1931 }
1931 1932
1932 // static 1933 // static
1933 Browser* Browser::GetBrowserForController( 1934 Browser* Browser::GetBrowserForController(
1934 const NavigationController* controller, int* index_result) { 1935 const NavigationController* controller, int* index_result) {
1935 BrowserList::const_iterator it; 1936 BrowserList::const_iterator it;
1936 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) { 1937 for (it = BrowserList::begin(); it != BrowserList::end(); ++it) {
1937 int index = (*it)->tabstrip_model_.GetIndexOfController(controller); 1938 int index = (*it)->tabstrip_model_.GetIndexOfController(controller);
1938 if (index != TabStripModel::kNoTab) { 1939 if (index != TabStripModel::kNoTab) {
1939 if (index_result) 1940 if (index_result)
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after
4044 } 4045 }
4045 4046
4046 bool Browser::IsPinned(TabContents* source) { 4047 bool Browser::IsPinned(TabContents* source) {
4047 int index = tabstrip_model_.GetIndexOfTabContents(source); 4048 int index = tabstrip_model_.GetIndexOfTabContents(source);
4048 if (index == TabStripModel::kNoTab) { 4049 if (index == TabStripModel::kNoTab) {
4049 NOTREACHED() << "IsPinned called for tab not in our strip"; 4050 NOTREACHED() << "IsPinned called for tab not in our strip";
4050 return false; 4051 return false;
4051 } 4052 }
4052 return tabstrip_model_.IsTabPinned(index); 4053 return tabstrip_model_.IsTabPinned(index);
4053 } 4054 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/dom_ui/dom_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698