Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | |
|
dominich
2012/07/19 16:04:38
wat?
gavinp
2012/07/23 18:35:21
This is a cleanup to make this file pass lint. See
| |
| 9 | |
| 8 #include "base/time.h" | 10 #include "base/time.h" |
| 9 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 10 | 12 |
| 11 namespace prerender { | 13 namespace prerender { |
| 12 | 14 |
| 13 struct Config { | 15 struct Config { |
| 14 Config(); | 16 Config(); |
| 15 | 17 |
| 16 // Maximum memory use for a prerendered page until it is killed. | 18 // Maximum memory use for a prerendered page until it is killed. |
| 17 size_t max_bytes; | 19 size_t max_bytes; |
| 18 | 20 |
| 19 // Number of simultaneous prendered pages allowed. | 21 // Number of simultaneous prendered pages allowed. |
| 20 unsigned int max_elements; | 22 static const int kDefaultMaxConcurrency = 2; |
|
dominich
2012/07/19 16:04:38
this doesn't need to be in the header.
gavinp
2012/07/23 18:35:21
It's used in prerender_histograms.cc though. What
| |
| 23 unsigned int max_concurrency; | |
|
dominich
2012/07/19 16:04:38
unsigned int, but the default is int? Sure, if som
gavinp
2012/07/23 18:35:21
Done.
| |
| 21 | 24 |
| 22 // Is rate limiting enabled? | 25 // Is rate limiting enabled? |
| 23 bool rate_limit_enabled; | 26 bool rate_limit_enabled; |
| 24 | 27 |
| 25 // Maximum age for a prerendered page until it is removed. | 28 // Maximum age for a prerendered page until it is removed. |
| 26 base::TimeDelta max_age; | 29 base::TimeDelta max_age; |
| 27 | 30 |
| 28 // Is https allowed? | 31 // Is https allowed? |
| 29 bool https_allowed; | 32 bool https_allowed; |
| 30 | 33 |
| 31 // The default tab bounds used as the prerenderer tab size when the active tab | 34 // The default tab bounds used as the prerenderer tab size when the active tab |
| 32 // cannot be accessed. | 35 // cannot be accessed. |
| 33 gfx::Rect default_tab_bounds; | 36 gfx::Rect default_tab_bounds; |
| 34 | 37 |
| 35 // User agent being used as an override for the WebContents. | 38 // User agent being used as an override for the WebContents. |
| 36 std::string user_agent_override; | 39 std::string user_agent_override; |
| 37 | 40 |
| 38 // Is the user agent being overridden for this NavigationEntry? | 41 // Is the user agent being overridden for this NavigationEntry? |
| 39 bool is_overriding_user_agent; | 42 bool is_overriding_user_agent; |
| 40 }; | 43 }; |
| 41 | 44 |
| 42 } // namespace prerender | 45 } // namespace prerender |
| 43 | 46 |
| 44 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ | 47 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONFIG_H_ |
| OLD | NEW |