OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/translate/core/browser/translate_ui_delegate.h" | 5 #include "components/translate/core/browser/translate_ui_delegate.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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "components/infobars/core/infobar.h" | 13 #include "components/infobars/core/infobar.h" |
| 14 #include "components/metrics/proto/translate_event.pb.h" |
14 #include "components/pref_registry/pref_registry_syncable.h" | 15 #include "components/pref_registry/pref_registry_syncable.h" |
15 #include "components/sync_preferences/testing_pref_service_syncable.h" | 16 #include "components/sync_preferences/testing_pref_service_syncable.h" |
16 #include "components/translate/core/browser/mock_translate_client.h" | 17 #include "components/translate/core/browser/mock_translate_client.h" |
17 #include "components/translate/core/browser/mock_translate_driver.h" | 18 #include "components/translate/core/browser/mock_translate_driver.h" |
18 #include "components/translate/core/browser/mock_translate_ranker.h" | 19 #include "components/translate/core/browser/mock_translate_ranker.h" |
19 #include "components/translate/core/browser/translate_client.h" | 20 #include "components/translate/core/browser/translate_client.h" |
20 #include "components/translate/core/browser/translate_infobar_delegate.h" | 21 #include "components/translate/core/browser/translate_infobar_delegate.h" |
21 #include "components/translate/core/browser/translate_manager.h" | 22 #include "components/translate/core/browser/translate_manager.h" |
22 #include "components/translate/core/browser/translate_prefs.h" | 23 #include "components/translate/core/browser/translate_prefs.h" |
23 #include "components/variations/variations_associated_data.h" | 24 #include "components/variations/variations_associated_data.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 prefs->IncrementTranslationAcceptedCount("ar"); | 160 prefs->IncrementTranslationAcceptedCount("ar"); |
160 | 161 |
161 EXPECT_FALSE(delegate_->ShouldAlwaysTranslateBeCheckedByDefault()); | 162 EXPECT_FALSE(delegate_->ShouldAlwaysTranslateBeCheckedByDefault()); |
162 } | 163 } |
163 | 164 |
164 // TODO(ftang) Currently this file only test TranslationDeclined(), we | 165 // TODO(ftang) Currently this file only test TranslationDeclined(), we |
165 // need to add the test for other functions soon to increase the test | 166 // need to add the test for other functions soon to increase the test |
166 // coverage. | 167 // coverage. |
167 | 168 |
168 } // namespace translate | 169 } // namespace translate |
OLD | NEW |