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

Side by Side Diff: chrome/browser/google_apis/drive_api_parser.h

Issue 14160002: Add HasChangeListKind and HasFileListKind methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 class FileList { 624 class FileList {
625 public: 625 public:
626 FileList(); 626 FileList();
627 ~FileList(); 627 ~FileList();
628 628
629 // Registers the mapping between JSON field names and the members in this 629 // Registers the mapping between JSON field names and the members in this
630 // class. 630 // class.
631 static void RegisterJSONConverter( 631 static void RegisterJSONConverter(
632 base::JSONValueConverter<FileList>* converter); 632 base::JSONValueConverter<FileList>* converter);
633 633
634 // Returns true if the |value| has kind field for FileList.
635 static bool HasFileListKind(const base::Value& value);
636
634 // Creates file list from parsed JSON. 637 // Creates file list from parsed JSON.
635 static scoped_ptr<FileList> CreateFrom(const base::Value& value); 638 static scoped_ptr<FileList> CreateFrom(const base::Value& value);
636 639
637 // Returns the ETag of the list. 640 // Returns the ETag of the list.
638 const std::string& etag() const { return etag_; } 641 const std::string& etag() const { return etag_; }
639 642
640 // Returns the page token for the next page of files, if the list is large 643 // Returns the page token for the next page of files, if the list is large
641 // to fit in one response. If this is empty, there is no more file lists. 644 // to fit in one response. If this is empty, there is no more file lists.
642 const std::string& next_page_token() const { return next_page_token_; } 645 const std::string& next_page_token() const { return next_page_token_; }
643 646
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 class ChangeList { 742 class ChangeList {
740 public: 743 public:
741 ChangeList(); 744 ChangeList();
742 ~ChangeList(); 745 ~ChangeList();
743 746
744 // Registers the mapping between JSON field names and the members in this 747 // Registers the mapping between JSON field names and the members in this
745 // class. 748 // class.
746 static void RegisterJSONConverter( 749 static void RegisterJSONConverter(
747 base::JSONValueConverter<ChangeList>* converter); 750 base::JSONValueConverter<ChangeList>* converter);
748 751
752 // Returns true if the |value| has kind field for ChangeList.
753 static bool HasChangeListKind(const base::Value& value);
754
749 // Creates change list from parsed JSON. 755 // Creates change list from parsed JSON.
750 static scoped_ptr<ChangeList> CreateFrom(const base::Value& value); 756 static scoped_ptr<ChangeList> CreateFrom(const base::Value& value);
751 757
752 // Returns the ETag of the list. 758 // Returns the ETag of the list.
753 const std::string& etag() const { return etag_; } 759 const std::string& etag() const { return etag_; }
754 760
755 // Returns the page token for the next page of files, if the list is large 761 // Returns the page token for the next page of files, if the list is large
756 // to fit in one response. If this is empty, there is no more file lists. 762 // to fit in one response. If this is empty, there is no more file lists.
757 const std::string& next_page_token() const { return next_page_token_; } 763 const std::string& next_page_token() const { return next_page_token_; }
758 764
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 GURL next_link_; 801 GURL next_link_;
796 int64 largest_change_id_; 802 int64 largest_change_id_;
797 ScopedVector<ChangeResource> items_; 803 ScopedVector<ChangeResource> items_;
798 804
799 DISALLOW_COPY_AND_ASSIGN(ChangeList); 805 DISALLOW_COPY_AND_ASSIGN(ChangeList);
800 }; 806 };
801 807
802 } // namespace google_apis 808 } // namespace google_apis
803 809
804 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_ 810 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google_apis/drive_api_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698