| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" | 7 #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" |
| 8 | 8 |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "chrome/browser/metrics/user_metrics.h" | 10 #include "chrome/browser/metrics/user_metrics.h" |
| 11 #include "chrome/browser/tab_contents/navigation_controller.h" | |
| 12 #include "chrome/browser/tab_contents/navigation_entry.h" | |
| 13 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 14 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 18 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
| 16 #include "content/browser/tab_contents/navigation_controller.h" |
| 17 #include "content/browser/tab_contents/navigation_entry.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" |
| 19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 20 #include "grit/theme_resources.h" | 20 #include "grit/theme_resources.h" |
| 21 #include "net/base/registry_controlled_domain.h" | 21 #include "net/base/registry_controlled_domain.h" |
| 22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 24 #include "ui/base/text/text_elider.h" | 24 #include "ui/base/text/text_elider.h" |
| 25 | 25 |
| 26 const int BackForwardMenuModel::kMaxHistoryItems = 12; | 26 const int BackForwardMenuModel::kMaxHistoryItems = 12; |
| 27 const int BackForwardMenuModel::kMaxChapterStops = 5; | 27 const int BackForwardMenuModel::kMaxChapterStops = 5; |
| 28 static const int kMaxWidth = 700; | 28 static const int kMaxWidth = 700; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 metric_string += "ForwardMenu_"; | 374 metric_string += "ForwardMenu_"; |
| 375 else | 375 else |
| 376 metric_string += "BackMenu_"; | 376 metric_string += "BackMenu_"; |
| 377 metric_string += action; | 377 metric_string += action; |
| 378 if (index != -1) { | 378 if (index != -1) { |
| 379 // +1 is for historical reasons (indices used to start at 1). | 379 // +1 is for historical reasons (indices used to start at 1). |
| 380 metric_string += base::IntToString(index + 1); | 380 metric_string += base::IntToString(index + 1); |
| 381 } | 381 } |
| 382 return metric_string; | 382 return metric_string; |
| 383 } | 383 } |
| OLD | NEW |