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

Side by Side Diff: components/translate/core/common/translation_logging_helper.cc

Issue 2938133003: Split translate_event.proto AUTOMATICALLY_TRANSLATED. (Closed)
Patch Set: updates Created 3 years, 6 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 | « components/translate/core/browser/translate_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/common/translation_logging_helper.h" 5 #include "components/translate/core/common/translation_logging_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "components/metrics/proto/translate_event.pb.h" 9 #include "components/metrics/proto/translate_event.pb.h"
10 #include "components/sync/protocol/user_event_specifics.pb.h" 10 #include "components/sync/protocol/user_event_specifics.pb.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 break; 53 break;
54 case TranslateEventProto::USER_IGNORE: 54 case TranslateEventProto::USER_IGNORE:
55 translation->set_interaction(sync_pb::Translation::IGNORED); 55 translation->set_interaction(sync_pb::Translation::IGNORED);
56 break; 56 break;
57 case TranslateEventProto::USER_DISMISS: 57 case TranslateEventProto::USER_DISMISS:
58 translation->set_interaction(sync_pb::Translation::DISMISSED); 58 translation->set_interaction(sync_pb::Translation::DISMISSED);
59 break; 59 break;
60 case TranslateEventProto::USER_REVERT: 60 case TranslateEventProto::USER_REVERT:
61 translation->set_interaction(sync_pb::Translation::TRANSLATION_REVERTED); 61 translation->set_interaction(sync_pb::Translation::TRANSLATION_REVERTED);
62 break; 62 break;
63 case TranslateEventProto::AUTOMATICALLY_TRANSLATED: 63 case TranslateEventProto::AUTO_TRANSLATION_BY_PREF:
64 translation->set_interaction(sync_pb::Translation::AUTOMATIC_TRANSLATION); 64 translation->set_interaction(
65 sync_pb::Translation::AUTO_TRANSLATION_BY_PREF);
66 break;
67 case TranslateEventProto::AUTO_TRANSLATION_BY_LINK:
68 translation->set_interaction(
69 sync_pb::Translation::AUTO_TRANSLATION_BY_LINK);
65 break; 70 break;
66 default: // We don't care about other events. 71 default: // We don't care about other events.
67 return false; 72 return false;
68 } 73 }
69 return true; 74 return true;
70 } 75 }
71 } // namespace translate 76 } // namespace translate
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698