| 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 "google_apis/drive/drive_api_parser.h" | 5 #include "google_apis/drive/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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 const base::Value& value) { | 695 const base::Value& value) { |
| 696 scoped_ptr<ImageMediaMetadata> resource(new ImageMediaMetadata()); | 696 scoped_ptr<ImageMediaMetadata> resource(new ImageMediaMetadata()); |
| 697 if (!resource->Parse(value)) { | 697 if (!resource->Parse(value)) { |
| 698 LOG(ERROR) << "Unable to create: Invalid ImageMediaMetadata JSON!"; | 698 LOG(ERROR) << "Unable to create: Invalid ImageMediaMetadata JSON!"; |
| 699 return scoped_ptr<ImageMediaMetadata>(); | 699 return scoped_ptr<ImageMediaMetadata>(); |
| 700 } | 700 } |
| 701 return resource.Pass(); | 701 return resource.Pass(); |
| 702 } | 702 } |
| 703 | 703 |
| 704 bool ImageMediaMetadata::Parse(const base::Value& value) { | 704 bool ImageMediaMetadata::Parse(const base::Value& value) { |
| 705 return true; | |
| 706 base::JSONValueConverter<ImageMediaMetadata> converter; | 705 base::JSONValueConverter<ImageMediaMetadata> converter; |
| 707 if (!converter.Convert(value, this)) { | 706 if (!converter.Convert(value, this)) { |
| 708 LOG(ERROR) << "Unable to parse: Invalid ImageMediaMetadata."; | 707 LOG(ERROR) << "Unable to parse: Invalid ImageMediaMetadata."; |
| 709 return false; | 708 return false; |
| 710 } | 709 } |
| 711 return true; | 710 return true; |
| 712 } | 711 } |
| 713 | 712 |
| 714 } // namespace google_apis | 713 } // namespace google_apis |
| OLD | NEW |