| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/search_provider_logos/google_logo_api.h" | 5 #include "components/search_provider_logos/google_logo_api.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 std::min(static_cast<int64_t>(time_to_live_ms), kMaxTimeToLiveMS)); | 123 std::min(static_cast<int64_t>(time_to_live_ms), kMaxTimeToLiveMS)); |
| 124 logo->metadata.can_show_after_expiration = false; | 124 logo->metadata.can_show_after_expiration = false; |
| 125 } else { | 125 } else { |
| 126 time_to_live = base::TimeDelta::FromMilliseconds(kMaxTimeToLiveMS); | 126 time_to_live = base::TimeDelta::FromMilliseconds(kMaxTimeToLiveMS); |
| 127 logo->metadata.can_show_after_expiration = true; | 127 logo->metadata.can_show_after_expiration = true; |
| 128 } | 128 } |
| 129 logo->metadata.expiration_time = response_time + time_to_live; | 129 logo->metadata.expiration_time = response_time + time_to_live; |
| 130 | 130 |
| 131 // If this point is reached, parsing has succeeded. | 131 // If this point is reached, parsing has succeeded. |
| 132 *parsing_failed = false; | 132 *parsing_failed = false; |
| 133 return logo.Pass(); | 133 return logo; |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace search_provider_logos | 136 } // namespace search_provider_logos |
| OLD | NEW |