| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/gdata/gdata_parser.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_parser.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/json/json_value_converter.h" | 9 #include "base/json/json_value_converter.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 const char* extension; | 130 const char* extension; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 const EntryKindMap kEntryKindMap[] = { | 133 const EntryKindMap kEntryKindMap[] = { |
| 134 { DocumentEntry::ITEM, "item", NULL}, | 134 { DocumentEntry::ITEM, "item", NULL}, |
| 135 { DocumentEntry::DOCUMENT, "document", ".gdoc"}, | 135 { DocumentEntry::DOCUMENT, "document", ".gdoc"}, |
| 136 { DocumentEntry::SPREADSHEET, "spreadsheet", ".gsheet"}, | 136 { DocumentEntry::SPREADSHEET, "spreadsheet", ".gsheet"}, |
| 137 { DocumentEntry::PRESENTATION, "presentation", ".gslides" }, | 137 { DocumentEntry::PRESENTATION, "presentation", ".gslides" }, |
| 138 { DocumentEntry::DRAWING, "drawing", ".gdraw"}, | 138 { DocumentEntry::DRAWING, "drawing", ".gdraw"}, |
| 139 { DocumentEntry::TABLE, "table", ".gtable"}, | 139 { DocumentEntry::TABLE, "table", ".gtable"}, |
| 140 { DocumentEntry::EXTERNAL_APP, "externalapp", ".glink"}, |
| 140 { DocumentEntry::SITE, "site", NULL}, | 141 { DocumentEntry::SITE, "site", NULL}, |
| 141 { DocumentEntry::FOLDER, "folder", NULL}, | 142 { DocumentEntry::FOLDER, "folder", NULL}, |
| 142 { DocumentEntry::FILE, "file", NULL}, | 143 { DocumentEntry::FILE, "file", NULL}, |
| 143 { DocumentEntry::PDF, "pdf", NULL}, | 144 { DocumentEntry::PDF, "pdf", NULL}, |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 struct LinkTypeMap { | 147 struct LinkTypeMap { |
| 147 Link::LinkType type; | 148 Link::LinkType type; |
| 148 const char* rel; | 149 const char* rel; |
| 149 }; | 150 }; |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 bool AccountMetadataFeed::Parse(const base::Value& value) { | 894 bool AccountMetadataFeed::Parse(const base::Value& value) { |
| 894 base::JSONValueConverter<AccountMetadataFeed> converter; | 895 base::JSONValueConverter<AccountMetadataFeed> converter; |
| 895 if (!converter.Convert(value, this)) { | 896 if (!converter.Convert(value, this)) { |
| 896 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!"; | 897 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!"; |
| 897 return false; | 898 return false; |
| 898 } | 899 } |
| 899 return true; | 900 return true; |
| 900 } | 901 } |
| 901 | 902 |
| 902 } // namespace gdata | 903 } // namespace gdata |
| OLD | NEW |