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

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

Issue 10920091: Move Drive API files to google_apis directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable some tests Created 8 years, 3 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_GOOGLE_APIS_GDATA_WAPI_PARSER_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/string_piece.h" 15 #include "base/string_piece.h"
16 #include "base/time.h" 16 #include "base/time.h"
17 #include "chrome/browser/chromeos/gdata/drive_entry_kinds.h" 17 #include "chrome/browser/google_apis/drive_entry_kinds.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 19
20 class FilePath; 20 class FilePath;
21 class Profile; 21 class Profile;
22 class XmlReader; 22 class XmlReader;
23 23
24 namespace base { 24 namespace base {
25 class Value; 25 class Value;
26 class DictionaryValue; 26 class DictionaryValue;
27 template <class StructType> 27 template <class StructType>
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // Text version of document entry kind. Returns an empty string for 431 // Text version of document entry kind. Returns an empty string for
432 // unknown entry kind. 432 // unknown entry kind.
433 std::string GetEntryKindText() const; 433 std::string GetEntryKindText() const;
434 434
435 // Returns preferred file extension for hosted documents. If entry is not 435 // Returns preferred file extension for hosted documents. If entry is not
436 // a hosted document, this call returns an empty string. 436 // a hosted document, this call returns an empty string.
437 std::string GetHostedDocumentExtension() const; 437 std::string GetHostedDocumentExtension() const;
438 438
439 // True if document entry is remotely hosted. 439 // True if document entry is remotely hosted.
440 bool is_hosted_document() const { 440 bool is_hosted_document() const {
441 return ClassifyEntryKind(kind_) & KIND_OF_HOSTED_DOCUMENT; 441 return (ClassifyEntryKind(kind_) & KIND_OF_HOSTED_DOCUMENT) > 0;
442 } 442 }
443 // True if document entry hosted by Google Documents. 443 // True if document entry hosted by Google Documents.
444 bool is_google_document() const { 444 bool is_google_document() const {
445 return ClassifyEntryKind(kind_) & KIND_OF_GOOGLE_DOCUMENT; 445 return (ClassifyEntryKind(kind_) & KIND_OF_GOOGLE_DOCUMENT) > 0;
446 } 446 }
447 // True if document entry is hosted by an external application. 447 // True if document entry is hosted by an external application.
448 bool is_external_document() const { 448 bool is_external_document() const {
449 return ClassifyEntryKind(kind_) & KIND_OF_EXTERNAL_DOCUMENT; 449 return (ClassifyEntryKind(kind_) & KIND_OF_EXTERNAL_DOCUMENT) > 0;
450 } 450 }
451 // True if document entry is a folder (collection). 451 // True if document entry is a folder (collection).
452 bool is_folder() const { return ClassifyEntryKind(kind_) & KIND_OF_FOLDER; } 452 bool is_folder() const {
453 return (ClassifyEntryKind(kind_) & KIND_OF_FOLDER) > 0;
454 }
453 // True if document entry is regular file. 455 // True if document entry is regular file.
454 bool is_file() const { return ClassifyEntryKind(kind_) & KIND_OF_FILE; } 456 bool is_file() const {
457 return (ClassifyEntryKind(kind_) & KIND_OF_FILE) > 0;
458 }
455 // True if document entry can't be mapped to the file system. 459 // True if document entry can't be mapped to the file system.
456 bool is_special() const { 460 bool is_special() const {
457 return !is_file() && !is_folder() && !is_hosted_document(); 461 return !is_file() && !is_folder() && !is_hosted_document();
458 } 462 }
459 463
460 // The following constructs are exposed for unit tests. 464 // The following constructs are exposed for unit tests.
461 465
462 // Classes of EntryKind. Used for ClassifyEntryKind(). 466 // Classes of EntryKind. Used for ClassifyEntryKind().
463 enum EntryKindClass { 467 enum EntryKindClass {
464 KIND_OF_NONE = 0, 468 KIND_OF_NONE = 0,
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 int64 quota_bytes_used_; 718 int64 quota_bytes_used_;
715 int64 largest_changestamp_; 719 int64 largest_changestamp_;
716 ScopedVector<InstalledApp> installed_apps_; 720 ScopedVector<InstalledApp> installed_apps_;
717 721
718 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed); 722 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed);
719 }; 723 };
720 724
721 725
722 } // namespace gdata 726 } // namespace gdata
723 727
724 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_PARSER_H_ 728 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698