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/webui/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 using content::BrowserThread; | 88 using content::BrowserThread; |
89 using content::WebContents; | 89 using content::WebContents; |
90 | 90 |
91 namespace { | 91 namespace { |
92 | 92 |
93 const char kCreditsJsPath[] = "credits.js"; | 93 const char kCreditsJsPath[] = "credits.js"; |
94 const char kMemoryJsPath[] = "memory.js"; | 94 const char kMemoryJsPath[] = "memory.js"; |
95 const char kMemoryCssPath[] = "about_memory.css"; | 95 const char kMemoryCssPath[] = "about_memory.css"; |
96 const char kStatsJsPath[] = "stats.js"; | 96 const char kStatsJsPath[] = "stats.js"; |
97 const char kStringsJsPath[] = "strings.js"; | 97 const char kStringsJsPath[] = "strings.js"; |
| 98 |
| 99 #if defined(OS_CHROMEOS) |
98 // chrome://terms falls back to offline page after kOnlineTermsTimeoutSec. | 100 // chrome://terms falls back to offline page after kOnlineTermsTimeoutSec. |
99 const int kOnlineTermsTimeoutSec = 7; | 101 const int kOnlineTermsTimeoutSec = 7; |
| 102 #endif // defined(OS_CHROMEOS) |
100 | 103 |
101 // When you type about:memory, it actually loads this intermediate URL that | 104 // When you type about:memory, it actually loads this intermediate URL that |
102 // redirects you to the final page. This avoids the problem where typing | 105 // redirects you to the final page. This avoids the problem where typing |
103 // "about:memory" on the new tab page or any other page where a process | 106 // "about:memory" on the new tab page or any other page where a process |
104 // transition would occur to the about URL will cause some confusion. | 107 // transition would occur to the about URL will cause some confusion. |
105 // | 108 // |
106 // The problem is that during the processing of the memory page, there are two | 109 // The problem is that during the processing of the memory page, there are two |
107 // processes active, the original and the destination one. This can create the | 110 // processes active, the original and the destination one. This can create the |
108 // impression that we're using more resources than we actually are. This | 111 // impression that we're using more resources than we actually are. This |
109 // redirect solves the problem by eliminating the process transition during the | 112 // redirect solves the problem by eliminating the process transition during the |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 Profile* profile = Profile::FromWebUI(web_ui); | 1086 Profile* profile = Profile::FromWebUI(web_ui); |
1084 | 1087 |
1085 #if defined(ENABLE_THEMES) | 1088 #if defined(ENABLE_THEMES) |
1086 // Set up the chrome://theme/ source. | 1089 // Set up the chrome://theme/ source. |
1087 ThemeSource* theme = new ThemeSource(profile); | 1090 ThemeSource* theme = new ThemeSource(profile); |
1088 content::URLDataSource::Add(profile, theme); | 1091 content::URLDataSource::Add(profile, theme); |
1089 #endif | 1092 #endif |
1090 | 1093 |
1091 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1094 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
1092 } | 1095 } |
OLD | NEW |