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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/rule_retriever.h

Issue 109323011: [rac] Download all rules for a country code in libaddressinput. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge smaller patches. Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/libaddressinput/chromium/cpp/src/rule_retriever.h
diff --git a/third_party/libaddressinput/chromium/cpp/src/rule_retriever.h b/third_party/libaddressinput/chromium/cpp/src/rule_retriever.h
index a44fb638db226ad59279906729ed01b7335b0ab4..8d66838e3f2968c2cb6352bcdeee6cf5f6b59c2b 100644
--- a/third_party/libaddressinput/chromium/cpp/src/rule_retriever.h
+++ b/third_party/libaddressinput/chromium/cpp/src/rule_retriever.h
@@ -21,11 +21,10 @@
#include <libaddressinput/util/basictypes.h>
#include <libaddressinput/util/scoped_ptr.h>
-#include <string>
-
namespace i18n {
namespace addressinput {
+class LookupKey;
class Retriever;
class Rule;
@@ -34,17 +33,18 @@ class Rule;
// RuleRetriever rules(retriever);
// scoped_ptr<RuleRetriever::Callback> rule_ready(BuildCallback(
// this, &MyClass::OnRuleReady));
-// rules.RetrieveRule("data/CA/AB--fr", *rule_ready);
+// LookupKey key("US");
+// rules.RetrieveRule(key, *rule_ready);
class RuleRetriever {
public:
- typedef i18n::addressinput::Callback<std::string, Rule> Callback;
+ typedef i18n::addressinput::Callback<LookupKey, Rule> Callback;
// Takes ownership of |retriever|.
explicit RuleRetriever(const Retriever* retriever);
~RuleRetriever();
// Retrieves the rule for |key| and invokes the |rule_ready| callback.
- void RetrieveRule(const std::string& key, const Callback& rule_ready) const;
+ void RetrieveRule(const LookupKey& key, const Callback& rule_ready) const;
private:
scoped_ptr<const Retriever> data_retriever_;

Powered by Google App Engine
This is Rietveld 408576698