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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "chrome/common/pref_service.h" | 49 #include "chrome/common/pref_service.h" |
50 #include "chrome/common/win_util.h" | 50 #include "chrome/common/win_util.h" |
51 #include "net/base/cookie_monster.h" | 51 #include "net/base/cookie_monster.h" |
52 #include "net/base/cookie_policy.h" | 52 #include "net/base/cookie_policy.h" |
53 #include "net/base/net_util.h" | 53 #include "net/base/net_util.h" |
54 #include "net/base/registry_controlled_domain.h" | 54 #include "net/base/registry_controlled_domain.h" |
55 | 55 |
56 #include "chromium_strings.h" | 56 #include "chromium_strings.h" |
57 #include "generated_resources.h" | 57 #include "generated_resources.h" |
58 | 58 |
| 59 using base::TimeDelta; |
| 60 |
59 static BrowserList g_browserlist; | 61 static BrowserList g_browserlist; |
60 | 62 |
61 // How long we wait before updating the browser chrome while loading a page. | 63 // How long we wait before updating the browser chrome while loading a page. |
62 static const int kUIUpdateCoalescingTimeMS = 200; | 64 static const int kUIUpdateCoalescingTimeMS = 200; |
63 | 65 |
64 // Idle time before helping prune memory consumption. | 66 // Idle time before helping prune memory consumption. |
65 static const int kBrowserReleaseMemoryInterval = 30; // In seconds. | 67 static const int kBrowserReleaseMemoryInterval = 30; // In seconds. |
66 | 68 |
67 // How much horizontal and vertical offset there is between newly opened | 69 // How much horizontal and vertical offset there is between newly opened |
68 // windows. | 70 // windows. |
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 void Browser::FormatTitleForDisplay(std::wstring* title) { | 1863 void Browser::FormatTitleForDisplay(std::wstring* title) { |
1862 size_t current_index = 0; | 1864 size_t current_index = 0; |
1863 size_t match_index; | 1865 size_t match_index; |
1864 while ((match_index = title->find(L'\n', current_index)) != | 1866 while ((match_index = title->find(L'\n', current_index)) != |
1865 std::wstring::npos) { | 1867 std::wstring::npos) { |
1866 title->replace(match_index, 1, L""); | 1868 title->replace(match_index, 1, L""); |
1867 current_index = match_index; | 1869 current_index = match_index; |
1868 } | 1870 } |
1869 } | 1871 } |
1870 | 1872 |
OLD | NEW |