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

Unified Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10828163: gdata: Remove obsolete GDataDB related code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove FromProtoString too Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.h ('k') | chrome/browser/chromeos/gdata/gdata_leveldb.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_files.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index 2e34813f3e946935efb27704e9a450dcc57e4d9f..642361103f9a2eada2b83d7c2c7912951442e702 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -733,33 +733,6 @@ void GDataEntry::SerializeToString(std::string* serialized_proto) const {
}
}
-// static
-scoped_ptr<GDataEntry> GDataEntry::FromProtoString(
- const std::string& serialized_proto) {
- // First try to parse as GDataDirectoryProto. Note that this can succeed for
- // a serialized_proto that's really a GDataEntryProto - we have to check
- // is_directory to be sure.
- GDataDirectoryProto dir_proto;
- bool ok = dir_proto.ParseFromString(serialized_proto);
- if (ok && dir_proto.gdata_entry().file_info().is_directory()) {
- scoped_ptr<GDataDirectory> dir(new GDataDirectory(NULL, NULL));
- if (!dir->FromProto(dir_proto))
- return scoped_ptr<GDataEntry>(NULL);
- return scoped_ptr<GDataEntry>(dir.release());
- }
-
- GDataEntryProto entry_proto;
- ok = entry_proto.ParseFromString(serialized_proto);
- if (ok) {
- DCHECK(!entry_proto.file_info().is_directory());
- scoped_ptr<GDataFile> file(new GDataFile(NULL, NULL));
- if (!file->FromProto(entry_proto))
- return scoped_ptr<GDataEntry>(NULL);
- return scoped_ptr<GDataEntry>(file.release());
- }
- return scoped_ptr<GDataEntry>(NULL);
-}
-
void GDataDirectoryService::SerializeToString(
std::string* serialized_proto) const {
GDataRootDirectoryProto proto;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.h ('k') | chrome/browser/chromeos/gdata/gdata_leveldb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698