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/drive_api_parser.h" | 5 #include "chrome/browser/chromeos/gdata/drive_api_parser.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 if (!converter.Convert(value, this)) { | 291 if (!converter.Convert(value, this)) { |
292 LOG(ERROR) << "Unable to parse: Invalid AppList"; | 292 LOG(ERROR) << "Unable to parse: Invalid AppList"; |
293 return false; | 293 return false; |
294 } | 294 } |
295 return true; | 295 return true; |
296 } | 296 } |
297 | 297 |
298 //////////////////////////////////////////////////////////////////////////////// | 298 //////////////////////////////////////////////////////////////////////////////// |
299 // FileResource implementation | 299 // FileResource implementation |
300 | 300 |
301 FileResource::FileResource() {} | 301 FileResource::FileResource() : file_size_(0) {} |
302 | 302 |
303 FileResource::~FileResource() {} | 303 FileResource::~FileResource() {} |
304 | 304 |
305 // static | 305 // static |
306 void FileResource::RegisterJSONConverter( | 306 void FileResource::RegisterJSONConverter( |
307 base::JSONValueConverter<FileResource>* converter) { | 307 base::JSONValueConverter<FileResource>* converter) { |
308 converter->RegisterStringField(kId, &FileResource::file_id_); | 308 converter->RegisterStringField(kId, &FileResource::file_id_); |
309 converter->RegisterStringField(kETag, &FileResource::etag_); | 309 converter->RegisterStringField(kETag, &FileResource::etag_); |
310 converter->RegisterStringField(kMimeType, &FileResource::mime_type_); | 310 converter->RegisterStringField(kMimeType, &FileResource::mime_type_); |
311 converter->RegisterStringField(kTitle, &FileResource::title_); | 311 converter->RegisterStringField(kTitle, &FileResource::title_); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 bool FileList::Parse(const base::Value& value) { | 380 bool FileList::Parse(const base::Value& value) { |
381 base::JSONValueConverter<FileList> converter; | 381 base::JSONValueConverter<FileList> converter; |
382 if (!converter.Convert(value, this)) { | 382 if (!converter.Convert(value, this)) { |
383 LOG(ERROR) << "Unable to parse: Invalid FileList"; | 383 LOG(ERROR) << "Unable to parse: Invalid FileList"; |
384 return false; | 384 return false; |
385 } | 385 } |
386 return true; | 386 return true; |
387 } | 387 } |
388 | 388 |
389 } // namespace gdata | 389 } // namespace gdata |
OLD | NEW |