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

Unified Diff: sync/syncable/syncable.cc

Issue 9836100: Add full text regex searching to chrome://sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 8 years, 8 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 | « sync/syncable/syncable.h ('k') | sync/syncable/syncable_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable.cc
diff --git a/sync/syncable/syncable.cc b/sync/syncable/syncable.cc
index 7bf1a58629caa4a85bf5400d34d3493bfc6cd5e5..f5dde90b7a4df9b0cbcf22e47c988507b96d0c3e 100644
--- a/sync/syncable/syncable.cc
+++ b/sync/syncable/syncable.cc
@@ -302,36 +302,6 @@ syncable::ModelType EntryKernel::GetServerModelType() const {
return UNSPECIFIED;
}
-bool EntryKernel::ContainsString(const std::string& lowercase_query) const {
- // TODO(lipalani) - figure out what to do if the node is encrypted.
- const sync_pb::EntitySpecifics& specifics = ref(SPECIFICS);
- std::string temp;
- // The protobuf serialized string contains the original strings. So
- // we will just serialize it and search it.
- specifics.SerializeToString(&temp);
-
- // Now convert to lower case.
- StringToLowerASCII(&temp);
-
- if (temp.find(lowercase_query) != std::string::npos)
- return true;
-
- // Now go through all the string fields to see if the value is there.
- for (int i = STRING_FIELDS_BEGIN; i < STRING_FIELDS_END; ++i) {
- if (StringToLowerASCII(ref(static_cast<StringField>(i))).find(
- lowercase_query) != std::string::npos)
- return true;
- }
-
- for (int i = ID_FIELDS_BEGIN; i < ID_FIELDS_END; ++i) {
- const Id& id = ref(static_cast<IdField>(i));
- if (id.ContainsStringCaseInsensitive(lowercase_query)) {
- return true;
- }
- }
- return false;
-}
-
namespace {
// Utility function to loop through a set of enum values and add the
« no previous file with comments | « sync/syncable/syncable.h ('k') | sync/syncable/syncable_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698