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

Side by Side Diff: content/browser/service_worker/service_worker_database.cc

Issue 1272823003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_database.h" 5 #include "content/browser/service_worker/service_worker_database.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 status = LevelDBStatusToStatus(itr->status()); 1207 status = LevelDBStatusToStatus(itr->status());
1208 if (status != STATUS_OK) { 1208 if (status != STATUS_OK) {
1209 HandleReadResult(FROM_HERE, status); 1209 HandleReadResult(FROM_HERE, status);
1210 return status; 1210 return status;
1211 } 1211 }
1212 1212
1213 std::string key; 1213 std::string key;
1214 if (!RemovePrefix(itr->key().ToString(), kRegKeyPrefix, &key)) 1214 if (!RemovePrefix(itr->key().ToString(), kRegKeyPrefix, &key))
1215 break; 1215 break;
1216 1216
1217 std::vector<std::string> parts; 1217 std::vector<std::string> parts =
1218 base::SplitStringDontTrim(key, kKeySeparator, &parts); 1218 base::SplitString(key, std::string(1, kKeySeparator),
1219 base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL);
1219 if (parts.size() != 2) { 1220 if (parts.size() != 2) {
1220 status = STATUS_ERROR_CORRUPTED; 1221 status = STATUS_ERROR_CORRUPTED;
1221 HandleReadResult(FROM_HERE, status); 1222 HandleReadResult(FROM_HERE, status);
1222 return status; 1223 return status;
1223 } 1224 }
1224 1225
1225 int64 registration_id; 1226 int64 registration_id;
1226 status = ParseId(parts[1], &registration_id); 1227 status = ParseId(parts[1], &registration_id);
1227 if (status != STATUS_OK) { 1228 if (status != STATUS_OK) {
1228 HandleReadResult(FROM_HERE, status); 1229 HandleReadResult(FROM_HERE, status);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 if (status != STATUS_OK) 1599 if (status != STATUS_OK)
1599 Disable(from_here, status); 1600 Disable(from_here, status);
1600 ServiceWorkerMetrics::CountWriteDatabaseResult(status); 1601 ServiceWorkerMetrics::CountWriteDatabaseResult(status);
1601 } 1602 }
1602 1603
1603 bool ServiceWorkerDatabase::IsDatabaseInMemory() const { 1604 bool ServiceWorkerDatabase::IsDatabaseInMemory() const {
1604 return path_.empty(); 1605 return path_.empty();
1605 } 1606 }
1606 1607
1607 } // namespace content 1608 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698