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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 | 171 |
172 // static | 172 // static |
173 void Browser::RegisterUserPrefs(PrefService* prefs) { | 173 void Browser::RegisterUserPrefs(PrefService* prefs) { |
174 prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); | 174 prefs->RegisterStringPref(prefs::kHomePage, L"chrome-internal:"); |
175 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); | 175 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true); |
176 prefs->RegisterIntegerPref(prefs::kCookieBehavior, | 176 prefs->RegisterIntegerPref(prefs::kCookieBehavior, |
177 net::CookiePolicy::ALLOW_ALL_COOKIES); | 177 net::CookiePolicy::ALLOW_ALL_COOKIES); |
178 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); | 178 prefs->RegisterBooleanPref(prefs::kShowHomeButton, false); |
179 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); | 179 prefs->RegisterStringPref(prefs::kRecentlySelectedEncoding, L""); |
| 180 prefs->RegisterBooleanPref(prefs::kDeleteBrowsingHistory, true); |
| 181 prefs->RegisterBooleanPref(prefs::kDeleteDownloadHistory, true); |
| 182 prefs->RegisterBooleanPref(prefs::kDeleteCache, true); |
| 183 prefs->RegisterBooleanPref(prefs::kDeleteCookies, true); |
| 184 prefs->RegisterBooleanPref(prefs::kDeletePasswords, false); |
180 } | 185 } |
181 | 186 |
182 Browser::Browser(const gfx::Rect& initial_bounds, | 187 Browser::Browser(const gfx::Rect& initial_bounds, |
183 int show_command, | 188 int show_command, |
184 Profile* profile, | 189 Profile* profile, |
185 BrowserType::Type type, | 190 BrowserType::Type type, |
186 const std::wstring& app_name) | 191 const std::wstring& app_name) |
187 : profile_(profile), | 192 : profile_(profile), |
188 window_(NULL), | 193 window_(NULL), |
189 initial_show_command_(show_command), | 194 initial_show_command_(show_command), |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 void Browser::FormatTitleForDisplay(std::wstring* title) { | 1862 void Browser::FormatTitleForDisplay(std::wstring* title) { |
1858 size_t current_index = 0; | 1863 size_t current_index = 0; |
1859 size_t match_index; | 1864 size_t match_index; |
1860 while ((match_index = title->find(L'\n', current_index)) != | 1865 while ((match_index = title->find(L'\n', current_index)) != |
1861 std::wstring::npos) { | 1866 std::wstring::npos) { |
1862 title->replace(match_index, 1, L""); | 1867 title->replace(match_index, 1, L""); |
1863 current_index = match_index; | 1868 current_index = match_index; |
1864 } | 1869 } |
1865 } | 1870 } |
1866 | 1871 |
OLD | NEW |