Chromium Code Reviews| Index: sync/syncable/syncable_id.cc |
| diff --git a/sync/syncable/syncable_id.cc b/sync/syncable/syncable_id.cc |
| index 5cd777ff2eff81f67f70b519eda98417eecd5c60..d50f6cb914043da2f37d4afbb4e9ffcc724b0f1f 100644 |
| --- a/sync/syncable/syncable_id.cc |
| +++ b/sync/syncable/syncable_id.cc |
| @@ -35,19 +35,23 @@ string Id::GetServerId() const { |
| Id Id::CreateFromServerId(const string& server_id) { |
| Id id; |
| - if (server_id == "0") |
| - id.s_ = "r"; |
| - else |
| - id.s_ = string("s") + server_id; |
| + if (!server_id.empty()) { |
|
Nicolas Zea
2015/01/26 23:21:53
This just for testing right? Or was there another
stanisc
2015/01/28 07:30:06
Once the server transition is done, most of parent
|
| + if (server_id == "0") |
| + id.s_ = "r"; |
| + else |
| + id.s_ = string("s") + server_id; |
| + } |
| return id; |
| } |
| Id Id::CreateFromClientString(const string& local_id) { |
| Id id; |
| - if (local_id == "0") |
| - id.s_ = "r"; |
| - else |
| - id.s_ = string("c") + local_id; |
| + if (!local_id.empty()) { |
| + if (local_id == "0") |
| + id.s_ = "r"; |
| + else |
| + id.s_ = string("c") + local_id; |
| + } |
| return id; |
| } |