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

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

Issue 363019: Fixes navigations chrome-internal: to actually show the NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | chrome/browser/browser_url_handler.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/keyboard_codes.h" 10 #include "base/keyboard_codes.h"
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 1245
1246 // static 1246 // static
1247 void Browser::RegisterPrefs(PrefService* prefs) { 1247 void Browser::RegisterPrefs(PrefService* prefs) {
1248 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); 1248 prefs->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
1249 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 1249 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
1250 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1); 1250 prefs->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1);
1251 } 1251 }
1252 1252
1253 // static 1253 // static
1254 void Browser::RegisterUserPrefs(PrefService* prefs) { 1254 void Browser::RegisterUserPrefs(PrefService* prefs) {
1255 prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); 1255 prefs->RegisterStringPref(prefs::kHomePage,
1256 ASCIIToWide(chrome::kChromeUINewTabURL));
1256 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); 1257 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true);
1257 prefs->RegisterIntegerPref(prefs::kCookieBehavior, 1258 prefs->RegisterIntegerPref(prefs::kCookieBehavior,
1258 net::CookiePolicy::ALLOW_ALL_COOKIES); 1259 net::CookiePolicy::ALLOW_ALL_COOKIES);
1259 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); 1260 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false);
1260 #if defined(OS_MACOSX) 1261 #if defined(OS_MACOSX)
1261 // This really belongs in platform code, but there's no good place to 1262 // This really belongs in platform code, but there's no good place to
1262 // initialize it between the time when the AppController is created 1263 // initialize it between the time when the AppController is created
1263 // (where there's no profile) and the time the controller gets another 1264 // (where there's no profile) and the time the controller gets another
1264 // crack at the start of the main event loop. By that time, BrowserInit 1265 // crack at the start of the main event loop. By that time, BrowserInit
1265 // has already created the browser window, and it's too late: we need the 1266 // has already created the browser window, and it's too late: we need the
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 /////////////////////////////////////////////////////////////////////////////// 2953 ///////////////////////////////////////////////////////////////////////////////
2953 // BrowserToolbarModel (private): 2954 // BrowserToolbarModel (private):
2954 2955
2955 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2956 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2956 // This |current_tab| can be NULL during the initialization of the 2957 // This |current_tab| can be NULL during the initialization of the
2957 // toolbar during window creation (i.e. before any tabs have been added 2958 // toolbar during window creation (i.e. before any tabs have been added
2958 // to the window). 2959 // to the window).
2959 TabContents* current_tab = browser_->GetSelectedTabContents(); 2960 TabContents* current_tab = browser_->GetSelectedTabContents();
2960 return current_tab ? &current_tab->controller() : NULL; 2961 return current_tab ? &current_tab->controller() : NULL;
2961 } 2962 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_url_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698