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

Unified Diff: components/sync/model/model_error.cc

Issue 2623723002: [Sync] Remove ModelError::IsSet() in favor of base::Optional. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/model/model_error.cc
diff --git a/components/sync/model/model_error.cc b/components/sync/model/model_error.cc
index 6ae66101d8ba9a10276d368fba12559882c40165..8b65536a90badd038d7515a9822467f3cf4ca511 100644
--- a/components/sync/model/model_error.cc
+++ b/components/sync/model/model_error.cc
@@ -6,25 +6,17 @@
namespace syncer {
-ModelError::ModelError() : is_set_(false) {}
-
ModelError::ModelError(const tracked_objects::Location& location,
const std::string& message)
- : is_set_(true), location_(location), message_(message) {}
+ : location_(location), message_(message) {}
ModelError::~ModelError() = default;
-bool ModelError::IsSet() const {
- return is_set_;
-}
-
const tracked_objects::Location& ModelError::location() const {
- DCHECK(IsSet());
return location_;
}
const std::string& ModelError::message() const {
- DCHECK(IsSet());
return message_;
}

Powered by Google App Engine
This is Rietveld 408576698