OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 // static | 174 // static |
175 void Browser::RegisterUserPrefs(PrefService* prefs) { | 175 void Browser::RegisterUserPrefs(PrefService* prefs) { |
176 prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); | 176 prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); |
177 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); | 177 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); |
178 prefs->RegisterIntegerPref(prefs::kCookieBehavior, | 178 prefs->RegisterIntegerPref(prefs::kCookieBehavior, |
179 net::CookiePolicy::ALLOW_ALL_COOKIES); | 179 net::CookiePolicy::ALLOW_ALL_COOKIES); |
180 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); | 180 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); |
181 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); | 181 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); |
| 182 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true); |
| 183 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true); |
| 184 prefs->RegisterBooleanPref(prefs::kDeleteCache, true); |
| 185 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true); |
| 186 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false); |
182 } | 187 } |
183 | 188 |
184 Browser::Browser(const gfx::Rect& initial_bounds, | 189 Browser::Browser(const gfx::Rect& initial_bounds, |
185 int show_command, | 190 int show_command, |
186 Profile* profile, | 191 Profile* profile, |
187 BrowserType::Type type, | 192 BrowserType::Type type, |
188 const std::wstring& app_name) | 193 const std::wstring& app_name) |
189 : profile_(profile), | 194 : profile_(profile), |
190 window_(NULL), | 195 window_(NULL), |
191 initial_show_command_(show_command), | 196 initial_show_command_(show_command), |
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 void Browser::FormatTitleForDisplay(std::wstring* title) { | 1855 void Browser::FormatTitleForDisplay(std::wstring* title) { |
1851 size_t current_index = 0; | 1856 size_t current_index = 0; |
1852 size_t match_index; | 1857 size_t match_index; |
1853 while ((match_index = title->find(L'\n', current_index)) != | 1858 while ((match_index = title->find(L'\n', current_index)) != |
1854 std::wstring::npos) { | 1859 std::wstring::npos) { |
1855 title->replace(match_index, 1, L""); | 1860 title->replace(match_index, 1, L""); |
1856 current_index = match_index; | 1861 current_index = match_index; |
1857 } | 1862 } |
1858 } | 1863 } |
1859 | 1864 |
OLD | NEW |