Index: third_party/libaddressinput/chromium/cpp/src/fallback_data_store.h |
diff --git a/third_party/libaddressinput/chromium/cpp/src/region_data_constants.h b/third_party/libaddressinput/chromium/cpp/src/fallback_data_store.h |
similarity index 61% |
copy from third_party/libaddressinput/chromium/cpp/src/region_data_constants.h |
copy to third_party/libaddressinput/chromium/cpp/src/fallback_data_store.h |
index 3897174b01cba0ffd1f297256e1dd8452b9301b3..c5f9e364f09c4ad7aa3f17281a2e0fa4546554ac 100644 |
--- a/third_party/libaddressinput/chromium/cpp/src/region_data_constants.h |
+++ b/third_party/libaddressinput/chromium/cpp/src/fallback_data_store.h |
@@ -1,4 +1,4 @@ |
-// Copyright (C) 2013 Google Inc. |
+// Copyright (C) 2014 Google Inc. |
// |
// Licensed under the Apache License, Version 2.0 (the "License"); |
// you may not use this file except in compliance with the License. |
@@ -12,23 +12,17 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#ifndef I18N_ADDRESSINPUT_REGION_DATA_CONSTANTS_H_ |
please use gerrit instead
2014/01/16 01:25:46
Don't we need a header guard?
Evan Stade
2014/01/16 01:53:55
yes we do, i simply forgot it.
|
-#define I18N_ADDRESSINPUT_REGION_DATA_CONSTANTS_H_ |
- |
#include <string> |
-#include <vector> |
namespace i18n { |
namespace addressinput { |
-class RegionDataConstants { |
+class FallbackDataStore { |
public: |
- static const std::vector<std::string>& GetRegionCodes(); |
- static const std::string& GetRegionData(const std::string& region_code); |
- static const std::string& GetDefaultRegionData(); |
+ // Gets default data for |key|. Should only be used as a last resort after |
+ // attempts to check the local cache or the webserver have failed. |
+ static bool Get(const std::string& key, std::string* data); |
}; |
} // namespace addressinput |
} // namespace i18n |
- |
-#endif // I18N_ADDRESSINPUT_REGION_DATA_CONSTANTS_H_ |