Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: chrome/browser/translate/translate_manager.cc

Issue 131203002: Move LanguageUsageMetrics and TranslateBrowserMetrics to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/translate/translate_language_list.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/translate/translate_manager.h" 5 #include "chrome/browser/translate/translate_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/tab_contents/language_state.h" 19 #include "chrome/browser/tab_contents/language_state.h"
20 #include "chrome/browser/tab_contents/tab_util.h" 20 #include "chrome/browser/tab_contents/tab_util.h"
21 #include "chrome/browser/translate/translate_accept_languages.h" 21 #include "chrome/browser/translate/translate_accept_languages.h"
22 #include "chrome/browser/translate/translate_browser_metrics.h"
23 #include "chrome/browser/translate/translate_infobar_delegate.h" 22 #include "chrome/browser/translate/translate_infobar_delegate.h"
24 #include "chrome/browser/translate/translate_language_list.h" 23 #include "chrome/browser/translate/translate_language_list.h"
25 #include "chrome/browser/translate/translate_prefs.h" 24 #include "chrome/browser/translate/translate_prefs.h"
26 #include "chrome/browser/translate/translate_script.h" 25 #include "chrome/browser/translate/translate_script.h"
27 #include "chrome/browser/translate/translate_tab_helper.h" 26 #include "chrome/browser/translate/translate_tab_helper.h"
28 #include "chrome/browser/translate/translate_url_util.h" 27 #include "chrome/browser/translate/translate_url_util.h"
29 #include "chrome/browser/ui/browser.h" 28 #include "chrome/browser/ui/browser.h"
30 #include "chrome/browser/ui/browser_finder.h" 29 #include "chrome/browser/ui/browser_finder.h"
31 #include "chrome/browser/ui/browser_tabstrip.h" 30 #include "chrome/browser/ui/browser_tabstrip.h"
32 #include "chrome/browser/ui/browser_window.h" 31 #include "chrome/browser/ui/browser_window.h"
33 #include "chrome/browser/ui/tabs/tab_strip_model.h" 32 #include "chrome/browser/ui/tabs/tab_strip_model.h"
34 #include "chrome/browser/ui/translate/translate_bubble_factory.h" 33 #include "chrome/browser/ui/translate/translate_bubble_factory.h"
35 #include "chrome/common/chrome_switches.h" 34 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
37 #include "chrome/common/render_messages.h" 36 #include "chrome/common/render_messages.h"
38 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
39 #include "components/translate/core/browser/page_translated_details.h" 38 #include "components/translate/core/browser/page_translated_details.h"
39 #include "components/translate/core/browser/translate_browser_metrics.h"
40 #include "components/translate/core/browser/translate_error_details.h" 40 #include "components/translate/core/browser/translate_error_details.h"
41 #include "components/translate/core/browser/translate_event_details.h" 41 #include "components/translate/core/browser/translate_event_details.h"
42 #include "components/translate/core/common/language_detection_details.h" 42 #include "components/translate/core/common/language_detection_details.h"
43 #include "components/translate/core/common/translate_constants.h" 43 #include "components/translate/core/common/translate_constants.h"
44 #include "content/public/browser/navigation_controller.h" 44 #include "content/public/browser/navigation_controller.h"
45 #include "content/public/browser/navigation_details.h" 45 #include "content/public/browser/navigation_details.h"
46 #include "content/public/browser/navigation_entry.h" 46 #include "content/public/browser/navigation_entry.h"
47 #include "content/public/browser/notification_details.h" 47 #include "content/public/browser/notification_details.h"
48 #include "content/public/browser/notification_service.h" 48 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/notification_source.h" 49 #include "content/public/browser/notification_source.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // so we are more aggressive about showing the shortcut to never translate. 810 // so we are more aggressive about showing the shortcut to never translate.
811 #if defined(OS_ANDROID) 811 #if defined(OS_ANDROID)
812 config.never_translate_min_count = 1; 812 config.never_translate_min_count = 1;
813 #else 813 #else
814 config.never_translate_min_count = 3; 814 config.never_translate_min_count = 3;
815 #endif // defined(OS_ANDROID) 815 #endif // defined(OS_ANDROID)
816 816
817 config.always_translate_min_count = 3; 817 config.always_translate_min_count = 3;
818 return config; 818 return config;
819 } 819 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_language_list.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698