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 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4262 // The page transition below is only for the purpose of inserting the tab. | 4261 // The page transition below is only for the purpose of inserting the tab. |
4263 browser->AddTab(view_source_contents, PageTransition::LINK); | 4262 browser->AddTab(view_source_contents, PageTransition::LINK); |
4264 } | 4263 } |
4265 | 4264 |
4266 if (profile_->HasSessionService()) { | 4265 if (profile_->HasSessionService()) { |
4267 SessionService* session_service = profile_->GetSessionService(); | 4266 SessionService* session_service = profile_->GetSessionService(); |
4268 if (session_service) | 4267 if (session_service) |
4269 session_service->TabRestored(&view_source_contents->controller(), false); | 4268 session_service->TabRestored(&view_source_contents->controller(), false); |
4270 } | 4269 } |
4271 } | 4270 } |
OLD | NEW |