| 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 <algorithm> |
| 8 |
| 7 #include "base/base64.h" | 9 #include "base/base64.h" |
| 8 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| 9 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
| 10 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
| 11 #include "base/values.h" | 13 #include "base/values.h" |
| 12 | 14 |
| 13 namespace search_provider_logos { | 15 namespace search_provider_logos { |
| 14 | 16 |
| 15 namespace { | 17 namespace { |
| 16 const char kResponsePreamble[] = ")]}'"; | 18 const char kResponsePreamble[] = ")]}'"; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 logo->metadata.can_show_after_expiration = true; | 125 logo->metadata.can_show_after_expiration = true; |
| 124 } | 126 } |
| 125 logo->metadata.expiration_time = response_time + time_to_live; | 127 logo->metadata.expiration_time = response_time + time_to_live; |
| 126 | 128 |
| 127 // If this point is reached, parsing has succeeded. | 129 // If this point is reached, parsing has succeeded. |
| 128 *parsing_failed = false; | 130 *parsing_failed = false; |
| 129 return logo.Pass(); | 131 return logo.Pass(); |
| 130 } | 132 } |
| 131 | 133 |
| 132 } // namespace search_provider_logos | 134 } // namespace search_provider_logos |
| OLD | NEW |