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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_wapi_parser.h

Issue 10837201: Pass parsed ChangeList to GDataFileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 unified diff | Download patch | Annotate | Revision Log
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_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 template <class NestedType> 29 template <class NestedType>
30 class RepeatedMessageConverter; 30 class RepeatedMessageConverter;
31 } // namespace internal 31 } // namespace internal
32 32
33 } // namespace base 33 } // namespace base
34 34
35 // Defines data elements of Google Documents API as described in 35 // Defines data elements of Google Documents API as described in
36 // http://code.google.com/apis/documents/. 36 // http://code.google.com/apis/documents/.
37 namespace gdata { 37 namespace gdata {
38 38
39 class ChangeList;
40 class ChangeResource;
41 class FileList;
42 class FileResource;
43
39 // Defines link (URL) of an entity (document, file, feed...). Each entity could 44 // Defines link (URL) of an entity (document, file, feed...). Each entity could
40 // have more than one link representing it. 45 // have more than one link representing it.
41 class Link { 46 class Link {
42 public: 47 public:
43 enum LinkType { 48 enum LinkType {
44 UNKNOWN, 49 UNKNOWN,
45 SELF, 50 SELF,
46 NEXT, 51 NEXT,
47 PARENT, 52 PARENT,
48 ALTERNATE, 53 ALTERNATE,
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 369
365 // Creates document entry from parsed JSON Value. You should call 370 // Creates document entry from parsed JSON Value. You should call
366 // this instead of instantiating JSONValueConverter by yourself 371 // this instead of instantiating JSONValueConverter by yourself
367 // because this method does some post-process for some fields. See 372 // because this method does some post-process for some fields. See
368 // FillRemainingFields comment and implementation for the details. 373 // FillRemainingFields comment and implementation for the details.
369 static DocumentEntry* CreateFrom(const base::Value& value); 374 static DocumentEntry* CreateFrom(const base::Value& value);
370 375
371 // Creates document entry from parsed XML. 376 // Creates document entry from parsed XML.
372 static DocumentEntry* CreateFromXml(XmlReader* xml_reader); 377 static DocumentEntry* CreateFromXml(XmlReader* xml_reader);
373 378
379 // Creates document entry from FileResource.
satorux1 2012/08/10 18:14:34 So you plan to remove this right? Please file a bu
kochi 2012/08/13 09:08:39 Done.
380 static DocumentEntry* CreateFromFileResource(const FileResource& file);
381
382 // Creates document entry from ChangeResource.
383 static DocumentEntry* CreateFromChangeResource(const ChangeResource& change);
satorux1 2012/08/10 18:14:34 ditto.
kochi 2012/08/13 09:08:39 Done.
384
374 // Returns name of entry node. 385 // Returns name of entry node.
375 static std::string GetEntryNodeName(); 386 static std::string GetEntryNodeName();
376 387
377 // Registers the mapping between JSON field names and the members in 388 // Registers the mapping between JSON field names and the members in
378 // this class. 389 // this class.
379 static void RegisterJSONConverter( 390 static void RegisterJSONConverter(
380 base::JSONValueConverter<DocumentEntry>* converter); 391 base::JSONValueConverter<DocumentEntry>* converter);
381 392
382 // Helper function for parsing bool fields based on presence of 393 // Helper function for parsing bool fields based on presence of
383 // their value nodes. 394 // their value nodes.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // "version": "1.0" 516 // "version": "1.0"
506 // } 517 // }
507 static scoped_ptr<DocumentFeed> ExtractAndParse(const base::Value& value); 518 static scoped_ptr<DocumentFeed> ExtractAndParse(const base::Value& value);
508 519
509 // Creates feed from parsed JSON Value. You should call this 520 // Creates feed from parsed JSON Value. You should call this
510 // instead of instantiating JSONValueConverter by yourself because 521 // instead of instantiating JSONValueConverter by yourself because
511 // this method does some post-process for some fields. See 522 // this method does some post-process for some fields. See
512 // FillRemainingFields comment and implementation in DocumentEntry 523 // FillRemainingFields comment and implementation in DocumentEntry
513 // class for the details. 524 // class for the details.
514 static scoped_ptr<DocumentFeed> CreateFrom(const base::Value& value); 525 static scoped_ptr<DocumentFeed> CreateFrom(const base::Value& value);
526 static scoped_ptr<DocumentFeed> CreateFromFileList(const FileList& filelist);
satorux1 2012/08/10 18:14:34 ditto.
kochi 2012/08/13 09:08:39 Done.
527 static scoped_ptr<DocumentFeed> CreateFromChangeList(
528 const ChangeList& changelist);
515 529
516 // Registers the mapping between JSON field names and the members in 530 // Registers the mapping between JSON field names and the members in
517 // this class. 531 // this class.
518 static void RegisterJSONConverter( 532 static void RegisterJSONConverter(
519 base::JSONValueConverter<DocumentFeed>* converter); 533 base::JSONValueConverter<DocumentFeed>* converter);
520 534
521 // Returns true and passes|url| of the next feed if the current entry list 535 // Returns true and passes|url| of the next feed if the current entry list
522 // does not completed this feed. 536 // does not completed this feed.
523 bool GetNextFeedURL(GURL* url); 537 bool GetNextFeedURL(GURL* url);
524 538
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 int64 largest_changestamp_; 700 int64 largest_changestamp_;
687 ScopedVector<InstalledApp> installed_apps_; 701 ScopedVector<InstalledApp> installed_apps_;
688 702
689 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed); 703 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed);
690 }; 704 };
691 705
692 706
693 } // namespace gdata 707 } // namespace gdata
694 708
695 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_ 709 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698