aboutsummaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorFredrik Roubert <roubert@google.com>2014-07-19 00:22:07 +0000
committerFredrik Roubert <roubert@google.com>2014-09-01 19:20:49 +0200
commitd1afaee9109dd9f73c4965a35cd11c91c7e1af25 (patch)
treedb8383790cd59fa8ac18fab91ebf9356d8473763 /cpp/src
parentca725fce2fdde7314504d843362178f059377432 (diff)
downloadsrc-d1afaee9109dd9f73c4965a35cd11c91c7e1af25.tar.gz
Store all callbacks as const scoped_ptr<const Callback>.
R=rouslan@chromium.org BUG= Review URL: https://codereview.appspot.com/116010043
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/retriever.cc4
-rw-r--r--cpp/src/retriever.h4
-rw-r--r--cpp/src/rule_retriever.cc2
-rw-r--r--cpp/src/rule_retriever.h4
-rw-r--r--cpp/src/validating_storage.cc2
-rw-r--r--cpp/src/validating_storage.h4
6 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/retriever.cc b/cpp/src/retriever.cc
index 8fa76b7..bdb8145 100644
--- a/cpp/src/retriever.cc
+++ b/cpp/src/retriever.cc
@@ -95,8 +95,8 @@ class Helper {
const LookupKeyUtil& lookup_key_util_;
const Downloader& downloader_;
ValidatingStorage* storage_;
- scoped_ptr<Downloader::Callback> downloaded_;
- scoped_ptr<Storage::Callback> validated_data_ready_;
+ const scoped_ptr<const Downloader::Callback> downloaded_;
+ const scoped_ptr<const Storage::Callback> validated_data_ready_;
std::string stale_data_;
DISALLOW_COPY_AND_ASSIGN(Helper);
diff --git a/cpp/src/retriever.h b/cpp/src/retriever.h
index 17d17ec..9634935 100644
--- a/cpp/src/retriever.h
+++ b/cpp/src/retriever.h
@@ -37,8 +37,8 @@ class ValidatingStorage;
// Downloader* downloader = ...;
// Retriever retriever("https://i18napis.appspot.com/ssl-address/",
// downloader, storage);
-// scoped_ptr<Retriever::Callback> retrieved(BuildCallback(
-// this, &MyClass::OnDataRetrieved));
+// const scoped_ptr<const Retriever::Callback> retrieved(
+// BuildCallback(this, &MyClass::OnDataRetrieved));
// retriever.Retrieve("data/CA/AB--fr", *retrieved);
class Retriever {
public:
diff --git a/cpp/src/rule_retriever.cc b/cpp/src/rule_retriever.cc
index a77c93a..f0ed848 100644
--- a/cpp/src/rule_retriever.cc
+++ b/cpp/src/rule_retriever.cc
@@ -57,7 +57,7 @@ class Helper {
}
const RuleRetriever::Callback& rule_ready_;
- scoped_ptr<Retriever::Callback> data_retrieved_;
+ const scoped_ptr<const Retriever::Callback> data_retrieved_;
DISALLOW_COPY_AND_ASSIGN(Helper);
};
diff --git a/cpp/src/rule_retriever.h b/cpp/src/rule_retriever.h
index ba3b4c7..ae4b5ee 100644
--- a/cpp/src/rule_retriever.h
+++ b/cpp/src/rule_retriever.h
@@ -32,8 +32,8 @@ class Rule;
// Retrieves validation rules. Sample usage:
// const Retriever* retriever = ...
// RuleRetriever rules(retriever);
-// scoped_ptr<RuleRetriever::Callback> rule_ready(BuildCallback(
-// this, &MyClass::OnRuleReady));
+// const scoped_ptr<const RuleRetriever::Callback> rule_ready(
+// BuildCallback(this, &MyClass::OnRuleReady));
// rules.RetrieveRule("data/CA/AB--fr", *rule_ready);
class RuleRetriever {
public:
diff --git a/cpp/src/validating_storage.cc b/cpp/src/validating_storage.cc
index d809bcc..a504db4 100644
--- a/cpp/src/validating_storage.cc
+++ b/cpp/src/validating_storage.cc
@@ -68,7 +68,7 @@ class Helper {
}
const Storage::Callback& data_ready_;
- scoped_ptr<Storage::Callback> wrapped_data_ready_;
+ const scoped_ptr<const Storage::Callback> wrapped_data_ready_;
DISALLOW_COPY_AND_ASSIGN(Helper);
};
diff --git a/cpp/src/validating_storage.h b/cpp/src/validating_storage.h
index 11e74cd..1cf3f95 100644
--- a/cpp/src/validating_storage.h
+++ b/cpp/src/validating_storage.h
@@ -32,8 +32,8 @@ namespace addressinput {
// scoped_ptr<Storage> file_storage = ...;
// ValidatingStorage storage(file_storage));
// storage.Put("key", new std::string("data"));
-// scoped_ptr<ValidatingStorage::Callback> data_ready(BuildCallback(
-// this, &MyClass::OnDataReady));
+// const scoped_ptr<const ValidatingStorage::Callback> data_ready(
+// BuildCallback(this, &MyClass::OnDataReady));
// storage.Get("key", *data_ready);
class ValidatingStorage : public Storage {
public: