| OLD | NEW |
| 1 // Copyright (C) 2013 Google Inc. | 1 // Copyright (C) 2013 Google Inc. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include <libaddressinput/util/scoped_ptr.h> | 21 #include <libaddressinput/util/scoped_ptr.h> |
| 22 | 22 |
| 23 #include <cassert> | 23 #include <cassert> |
| 24 #include <cstddef> | 24 #include <cstddef> |
| 25 #include <cstdlib> | 25 #include <cstdlib> |
| 26 #include <ctime> | 26 #include <ctime> |
| 27 #include <map> | 27 #include <map> |
| 28 #include <string> | 28 #include <string> |
| 29 | 29 |
| 30 #include "fallback_data_store.h" | 30 #include "fallback_data_store.h" |
| 31 #include "time_to_string.h" |
| 31 #include "util/md5.h" | 32 #include "util/md5.h" |
| 32 #include "util/stl_util.h" | 33 #include "util/stl_util.h" |
| 33 #include "util/string_util.h" | |
| 34 | 34 |
| 35 namespace i18n { | 35 namespace i18n { |
| 36 namespace addressinput { | 36 namespace addressinput { |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // The number of seconds after which data is considered stale. The staleness | 40 // The number of seconds after which data is considered stale. The staleness |
| 41 // threshold is 30 days: | 41 // threshold is 30 days: |
| 42 // 30 days * | 42 // 30 days * |
| 43 // 24 hours per day * | 43 // 24 hours per day * |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 requests_[key] = callback.release(); | 266 requests_[key] = callback.release(); |
| 267 return false; | 267 return false; |
| 268 } | 268 } |
| 269 | 269 |
| 270 requests_.erase(iter); | 270 requests_.erase(iter); |
| 271 return true; | 271 return true; |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace addressinput | 274 } // namespace addressinput |
| 275 } // namespace i18n | 275 } // namespace i18n |
| OLD | NEW |