| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser.h" | 5 #include "chrome/browser/ui/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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1983   prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, false); | 1983   prefs->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, false); | 
| 1984 #endif | 1984 #endif | 
| 1985 } | 1985 } | 
| 1986 | 1986 | 
| 1987 // static | 1987 // static | 
| 1988 void Browser::RegisterUserPrefs(PrefService* prefs) { | 1988 void Browser::RegisterUserPrefs(PrefService* prefs) { | 
| 1989   prefs->RegisterStringPref(prefs::kHomePage, | 1989   prefs->RegisterStringPref(prefs::kHomePage, | 
| 1990                             chrome::kChromeUINewTabURL); | 1990                             chrome::kChromeUINewTabURL); | 
| 1991   prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); | 1991   prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); | 
| 1992   prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); | 1992   prefs->RegisterBooleanPref(prefs::kClearSiteDataOnExit, false); | 
| 1993   prefs->RegisterBooleanPref(prefs::kClearPluginLSODataOnExit, false); |  | 
| 1994   prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); | 1993   prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); | 
| 1995 #if defined(OS_MACOSX) | 1994 #if defined(OS_MACOSX) | 
| 1996   // This really belongs in platform code, but there's no good place to | 1995   // This really belongs in platform code, but there's no good place to | 
| 1997   // initialize it between the time when the AppController is created | 1996   // initialize it between the time when the AppController is created | 
| 1998   // (where there's no profile) and the time the controller gets another | 1997   // (where there's no profile) and the time the controller gets another | 
| 1999   // crack at the start of the main event loop. By that time, BrowserInit | 1998   // crack at the start of the main event loop. By that time, BrowserInit | 
| 2000   // has already created the browser window, and it's too late: we need the | 1999   // has already created the browser window, and it's too late: we need the | 
| 2001   // pref to be already initialized. Doing it here also saves us from having | 2000   // pref to be already initialized. Doing it here also saves us from having | 
| 2002   // to hard-code pref registration in the several unit tests that use | 2001   // to hard-code pref registration in the several unit tests that use | 
| 2003   // this preference. | 2002   // this preference. | 
| (...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4236     // The page transition below is only for the purpose of inserting the tab. | 4235     // The page transition below is only for the purpose of inserting the tab. | 
| 4237     browser->AddTab(view_source_contents, PageTransition::LINK); | 4236     browser->AddTab(view_source_contents, PageTransition::LINK); | 
| 4238   } | 4237   } | 
| 4239 | 4238 | 
| 4240   if (profile_->HasSessionService()) { | 4239   if (profile_->HasSessionService()) { | 
| 4241     SessionService* session_service = profile_->GetSessionService(); | 4240     SessionService* session_service = profile_->GetSessionService(); | 
| 4242     if (session_service) | 4241     if (session_service) | 
| 4243       session_service->TabRestored(&view_source_contents->controller(), false); | 4242       session_service->TabRestored(&view_source_contents->controller(), false); | 
| 4244   } | 4243   } | 
| 4245 } | 4244 } | 
| OLD | NEW | 
|---|