| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, | 2357 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, |
| 2358 true, | 2358 true, |
| 2359 PrefService::SYNCABLE_PREF); | 2359 PrefService::SYNCABLE_PREF); |
| 2360 prefs->RegisterBooleanPref(prefs::kShowHomeButton, | 2360 prefs->RegisterBooleanPref(prefs::kShowHomeButton, |
| 2361 false, | 2361 false, |
| 2362 PrefService::SYNCABLE_PREF); | 2362 PrefService::SYNCABLE_PREF); |
| 2363 #if defined(OS_MACOSX) | 2363 #if defined(OS_MACOSX) |
| 2364 // This really belongs in platform code, but there's no good place to | 2364 // This really belongs in platform code, but there's no good place to |
| 2365 // initialize it between the time when the AppController is created | 2365 // initialize it between the time when the AppController is created |
| 2366 // (where there's no profile) and the time the controller gets another | 2366 // (where there's no profile) and the time the controller gets another |
| 2367 // crack at the start of the main event loop. By that time, BrowserInit | 2367 // crack at the start of the main event loop. By that time, |
| 2368 // has already created the browser window, and it's too late: we need the | 2368 // StartupBrowserCreator has already created the browser window, and it's too |
| 2369 // pref to be already initialized. Doing it here also saves us from having | 2369 // late: we need the pref to be already initialized. Doing it here also saves |
| 2370 // to hard-code pref registration in the several unit tests that use | 2370 // us from having to hard-code pref registration in the several unit tests |
| 2371 // this preference. | 2371 // that use this preference. |
| 2372 prefs->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, | 2372 prefs->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, |
| 2373 true, | 2373 true, |
| 2374 PrefService::UNSYNCABLE_PREF); | 2374 PrefService::UNSYNCABLE_PREF); |
| 2375 #endif | 2375 #endif |
| 2376 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, | 2376 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, |
| 2377 true, | 2377 true, |
| 2378 PrefService::SYNCABLE_PREF); | 2378 PrefService::SYNCABLE_PREF); |
| 2379 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, | 2379 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, |
| 2380 true, | 2380 true, |
| 2381 PrefService::SYNCABLE_PREF); | 2381 PrefService::SYNCABLE_PREF); |
| (...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5487 if (contents && !allow_js_access) { | 5487 if (contents && !allow_js_access) { |
| 5488 contents->web_contents()->GetController().LoadURL( | 5488 contents->web_contents()->GetController().LoadURL( |
| 5489 target_url, | 5489 target_url, |
| 5490 content::Referrer(), | 5490 content::Referrer(), |
| 5491 content::PAGE_TRANSITION_LINK, | 5491 content::PAGE_TRANSITION_LINK, |
| 5492 std::string()); // No extra headers. | 5492 std::string()); // No extra headers. |
| 5493 } | 5493 } |
| 5494 | 5494 |
| 5495 return contents != NULL; | 5495 return contents != NULL; |
| 5496 } | 5496 } |
| OLD | NEW |