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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/src/retriever.cc

Issue 208243005: Determine language code and type of format for address. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ctime include. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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"
32 #include "util/md5.h" 31 #include "util/md5.h"
33 #include "util/stl_util.h" 32 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698