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

Unified Diff: content/browser/dom_storage/session_storage_database_unittest.cc

Issue 2131933002: Revert of Replace string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « content/browser/dom_storage/session_storage_database.cc ('k') | content/browser/iframe_zoom_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/session_storage_database_unittest.cc
diff --git a/content/browser/dom_storage/session_storage_database_unittest.cc b/content/browser/dom_storage/session_storage_database_unittest.cc
index bc6a5fdd812898a9194fed9a76e3b8140c1fe763..9440e0d789e6a565e0688b96c52d6faaf236b9be 100644
--- a/content/browser/dom_storage/session_storage_database_unittest.cc
+++ b/content/browser/dom_storage/session_storage_database_unittest.cc
@@ -17,7 +17,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/common/dom_storage/dom_storage_types.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -114,7 +113,7 @@
bool SessionStorageDatabaseTest::IsNamespaceKey(const std::string& key,
std::string* namespace_id) {
std::string namespace_prefix = SessionStorageDatabase::NamespacePrefix();
- if (!base::StartsWith(key, namespace_prefix, base::CompareCase::SENSITIVE))
+ if (key.find(namespace_prefix) != 0)
return false;
if (key == namespace_prefix)
return false;
@@ -135,7 +134,7 @@
const std::string& key,
std::string* namespace_id) {
std::string namespace_prefix = SessionStorageDatabase::NamespacePrefix();
- if (!base::StartsWith(key, namespace_prefix, base::CompareCase::SENSITIVE))
+ if (key.find(namespace_prefix) != 0)
return false;
size_t second_dash = key.find('-', namespace_prefix.length());
if (second_dash == std::string::npos || second_dash == key.length() - 1)
@@ -153,7 +152,7 @@
bool SessionStorageDatabaseTest::IsMapRefCountKey(const std::string& key,
int64_t* map_id) {
std::string map_prefix = "map-";
- if (!base::StartsWith(key, map_prefix, base::CompareCase::SENSITIVE))
+ if (key.find(map_prefix) != 0)
return false;
size_t second_dash = key.find('-', map_prefix.length());
if (second_dash != key.length() - 1)
@@ -170,7 +169,7 @@
bool SessionStorageDatabaseTest::IsMapValueKey(const std::string& key,
int64_t* map_id) {
std::string map_prefix = "map-";
- if (!base::StartsWith(key, map_prefix, base::CompareCase::SENSITIVE))
+ if (key.find(map_prefix) != 0)
return false;
size_t second_dash = key.find('-', map_prefix.length());
if (second_dash == std::string::npos || second_dash == key.length() - 1)
« no previous file with comments | « content/browser/dom_storage/session_storage_database.cc ('k') | content/browser/iframe_zoom_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698