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

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

Issue 449004: Merge r33241 to the 249 branch.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/src/
Patch Set: Created 11 years 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 | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/browser_init.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/gfx/point.h" 10 #include "base/gfx/point.h"
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 #if defined(OS_MACOSX) 1328 #if defined(OS_MACOSX)
1329 // This really belongs in platform code, but there's no good place to 1329 // This really belongs in platform code, but there's no good place to
1330 // initialize it between the time when the AppController is created 1330 // initialize it between the time when the AppController is created
1331 // (where there's no profile) and the time the controller gets another 1331 // (where there's no profile) and the time the controller gets another
1332 // crack at the start of the main event loop. By that time, BrowserInit 1332 // crack at the start of the main event loop. By that time, BrowserInit
1333 // has already created the browser window, and it's too late: we need the 1333 // has already created the browser window, and it's too late: we need the
1334 // pref to be already initialized. Doing it here also saves us from having 1334 // pref to be already initialized. Doing it here also saves us from having
1335 // to hard-code pref registration in the several unit tests that use 1335 // to hard-code pref registration in the several unit tests that use
1336 // this preference. 1336 // this preference.
1337 prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false); 1337 prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false);
1338 prefs->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true);
1338 #endif 1339 #endif
1339 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); 1340 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L"");
1340 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true); 1341 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true);
1341 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true); 1342 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true);
1342 prefs->RegisterBooleanPref(prefs::kDeleteCache, true); 1343 prefs->RegisterBooleanPref(prefs::kDeleteCache, true);
1343 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true); 1344 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true);
1344 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false); 1345 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false);
1345 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true); 1346 prefs->RegisterBooleanPref(prefs::kDeleteFormData, true);
1346 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0); 1347 prefs->RegisterIntegerPref(prefs::kDeleteTimePeriod, 0);
1347 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true); 1348 prefs->RegisterBooleanPref(prefs::kCheckDefaultBrowser, true);
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 /////////////////////////////////////////////////////////////////////////////// 3030 ///////////////////////////////////////////////////////////////////////////////
3030 // BrowserToolbarModel (private): 3031 // BrowserToolbarModel (private):
3031 3032
3032 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 3033 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
3033 // This |current_tab| can be NULL during the initialization of the 3034 // This |current_tab| can be NULL during the initialization of the
3034 // toolbar during window creation (i.e. before any tabs have been added 3035 // toolbar during window creation (i.e. before any tabs have been added
3035 // to the window). 3036 // to the window).
3036 TabContents* current_tab = browser_->GetSelectedTabContents(); 3037 TabContents* current_tab = browser_->GetSelectedTabContents();
3037 return current_tab ? &current_tab->controller() : NULL; 3038 return current_tab ? &current_tab->controller() : NULL;
3038 } 3039 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698