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/offline_pages/core/background/request_coordinator_event_log
ger.h" | 5 #include "components/offline_pages/core/background/request_coordinator_event_log
ger.h" |
6 | 6 |
7 namespace offline_pages { | 7 namespace offline_pages { |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 case RequestNotifier::BackgroundSavePageResult::FOREGROUND_CANCELED: | 61 case RequestNotifier::BackgroundSavePageResult::FOREGROUND_CANCELED: |
62 return "FOREGROUND_CANCELED"; | 62 return "FOREGROUND_CANCELED"; |
63 case RequestNotifier::BackgroundSavePageResult::SAVE_FAILED: | 63 case RequestNotifier::BackgroundSavePageResult::SAVE_FAILED: |
64 return "SAVE_FAILED"; | 64 return "SAVE_FAILED"; |
65 case RequestNotifier::BackgroundSavePageResult::EXPIRED: | 65 case RequestNotifier::BackgroundSavePageResult::EXPIRED: |
66 return "EXPIRED"; | 66 return "EXPIRED"; |
67 case RequestNotifier::BackgroundSavePageResult::RETRY_COUNT_EXCEEDED: | 67 case RequestNotifier::BackgroundSavePageResult::RETRY_COUNT_EXCEEDED: |
68 return "RETRY_COUNT_EXCEEDED"; | 68 return "RETRY_COUNT_EXCEEDED"; |
69 case RequestNotifier::BackgroundSavePageResult::START_COUNT_EXCEEDED: | 69 case RequestNotifier::BackgroundSavePageResult::START_COUNT_EXCEEDED: |
70 return "START_COUNT_EXCEEDED"; | 70 return "START_COUNT_EXCEEDED"; |
71 case RequestNotifier::BackgroundSavePageResult::REMOVED: | 71 case RequestNotifier::BackgroundSavePageResult::USER_CANCELED: |
72 return "REMOVED"; | 72 return "REMOVED"; |
73 default: | 73 default: |
74 NOTREACHED(); | 74 NOTREACHED(); |
75 return std::to_string(static_cast<int>(result)); | 75 return std::to_string(static_cast<int>(result)); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 static std::string UpdateRequestResultToString(UpdateRequestResult result) { | 79 static std::string UpdateRequestResultToString(UpdateRequestResult result) { |
80 switch (result) { | 80 switch (result) { |
81 case UpdateRequestResult::SUCCESS: | 81 case UpdateRequestResult::SUCCESS: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 void RequestCoordinatorEventLogger::RecordUpdateRequestFailed( | 115 void RequestCoordinatorEventLogger::RecordUpdateRequestFailed( |
116 const std::string& name_space, | 116 const std::string& name_space, |
117 UpdateRequestResult result) { | 117 UpdateRequestResult result) { |
118 RecordActivity("Updating queued request for " + name_space + " failed - " + | 118 RecordActivity("Updating queued request for " + name_space + " failed - " + |
119 UpdateRequestResultToString(result)); | 119 UpdateRequestResultToString(result)); |
120 } | 120 } |
121 | 121 |
122 } // namespace offline_pages | 122 } // namespace offline_pages |
OLD | NEW |