| 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/views/sad_tab_view.h" | 5 #include "chrome/browser/ui/views/sad_tab_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 const int kPadding = 20; | 35 const int kPadding = 20; |
| 36 const float kMessageSize = 0.65f; | 36 const float kMessageSize = 0.65f; |
| 37 const SkColor kTextColor = SK_ColorWHITE; | 37 const SkColor kTextColor = SK_ColorWHITE; |
| 38 const SkColor kCrashColor = SkColorSetRGB(35, 48, 64); | 38 const SkColor kCrashColor = SkColorSetRGB(35, 48, 64); |
| 39 const SkColor kKillColor = SkColorSetRGB(57, 48, 88); | 39 const SkColor kKillColor = SkColorSetRGB(57, 48, 88); |
| 40 | 40 |
| 41 const char kCategoryTagCrash[] = "Crash"; | 41 const char kCategoryTagCrash[] = "Crash"; |
| 42 | 42 |
| 43 // Font size correction. | 43 // Font size correction. |
| 44 #if defined(CROS_FONTS_USING_BCI) | |
| 45 const int kTitleFontSizeDelta = 1; | |
| 46 const int kMessageFontSizeDelta = 0; | |
| 47 #else | |
| 48 const int kTitleFontSizeDelta = 2; | 44 const int kTitleFontSizeDelta = 2; |
| 49 const int kMessageFontSizeDelta = 1; | 45 const int kMessageFontSizeDelta = 1; |
| 50 #endif | |
| 51 | 46 |
| 52 // Name of the experiment to run. | 47 // Name of the experiment to run. |
| 53 const char kExperiment[] = "LowMemoryMargin"; | 48 const char kExperiment[] = "LowMemoryMargin"; |
| 54 | 49 |
| 55 #define EXPERIMENT_CUSTOM_COUNTS(name, sample, min, max, buckets) \ | 50 #define EXPERIMENT_CUSTOM_COUNTS(name, sample, min, max, buckets) \ |
| 56 { \ | 51 { \ |
| 57 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, buckets); \ | 52 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, min, max, buckets); \ |
| 58 if (base::FieldTrialList::TrialExists(kExperiment)) \ | 53 if (base::FieldTrialList::TrialExists(kExperiment)) \ |
| 59 UMA_HISTOGRAM_CUSTOM_COUNTS( \ | 54 UMA_HISTOGRAM_CUSTOM_COUNTS( \ |
| 60 base::FieldTrial::MakeName(name, kExperiment), \ | 55 base::FieldTrial::MakeName(name, kExperiment), \ |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 258 } |
| 264 | 259 |
| 265 views::Link* SadTabView::CreateLink(const string16& text) { | 260 views::Link* SadTabView::CreateLink(const string16& text) { |
| 266 views::Link* link = new views::Link(text); | 261 views::Link* link = new views::Link(text); |
| 267 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); | 262 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); |
| 268 link->SetBackgroundColor(background()->get_color()); | 263 link->SetBackgroundColor(background()->get_color()); |
| 269 link->SetEnabledColor(kTextColor); | 264 link->SetEnabledColor(kTextColor); |
| 270 link->set_listener(this); | 265 link->set_listener(this); |
| 271 return link; | 266 return link; |
| 272 } | 267 } |
| OLD | NEW |