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 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_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/google_apis/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; | |
21 class Profile; | 20 class Profile; |
22 | 21 |
23 namespace base { | 22 namespace base { |
| 23 class FilePath; |
| 24 class DictionaryValue; |
24 class Value; | 25 class Value; |
25 class DictionaryValue; | 26 |
26 template <class StructType> | 27 template <class StructType> |
27 class JSONValueConverter; | 28 class JSONValueConverter; |
28 | 29 |
29 namespace internal { | 30 namespace internal { |
30 template <class NestedType> | 31 template <class NestedType> |
31 class RepeatedMessageConverter; | 32 class RepeatedMessageConverter; |
32 } // namespace internal | 33 } // namespace internal |
33 | 34 |
34 } // namespace base | 35 } // namespace base |
35 | 36 |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 // Sets true to |result| if the field exists. | 415 // Sets true to |result| if the field exists. |
415 // Always returns true even when the field does not exist. | 416 // Always returns true even when the field does not exist. |
416 static bool HasFieldPresent(const base::Value* value, bool* result); | 417 static bool HasFieldPresent(const base::Value* value, bool* result); |
417 | 418 |
418 // Parses |value| as int64 and sets it to |result|. If the field does not | 419 // Parses |value| as int64 and sets it to |result|. If the field does not |
419 // exist, sets 0 to |result| as default value. | 420 // exist, sets 0 to |result| as default value. |
420 // Returns true if |value| is NULL or it is parsed as int64 successfully. | 421 // Returns true if |value| is NULL or it is parsed as int64 successfully. |
421 static bool ParseChangestamp(const base::Value* value, int64* result); | 422 static bool ParseChangestamp(const base::Value* value, int64* result); |
422 | 423 |
423 // Returns true if |file| has one of the hosted document extensions. | 424 // Returns true if |file| has one of the hosted document extensions. |
424 static bool HasHostedDocumentExtension(const FilePath& file); | 425 static bool HasHostedDocumentExtension(const base::FilePath& file); |
425 | 426 |
426 // The resource ID is used to identify a resource, which looks like: | 427 // The resource ID is used to identify a resource, which looks like: |
427 // file:d41d8cd98f00b204e9800998ecf8 | 428 // file:d41d8cd98f00b204e9800998ecf8 |
428 const std::string& resource_id() const { return resource_id_; } | 429 const std::string& resource_id() const { return resource_id_; } |
429 | 430 |
430 // This is a URL looks like: | 431 // This is a URL looks like: |
431 // https://docs.google.com/feeds/id/file%3Ad41d8cd98f00b204e9800998ecf8. | 432 // https://docs.google.com/feeds/id/file%3Ad41d8cd98f00b204e9800998ecf8. |
432 // The URL is currently not used. | 433 // The URL is currently not used. |
433 const std::string& id() const { return id_; } | 434 const std::string& id() const { return id_; } |
434 | 435 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 int64 largest_changestamp_; | 850 int64 largest_changestamp_; |
850 ScopedVector<InstalledApp> installed_apps_; | 851 ScopedVector<InstalledApp> installed_apps_; |
851 | 852 |
852 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed); | 853 DISALLOW_COPY_AND_ASSIGN(AccountMetadataFeed); |
853 }; | 854 }; |
854 | 855 |
855 | 856 |
856 } // namespace google_apis | 857 } // namespace google_apis |
857 | 858 |
858 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_ | 859 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_PARSER_H_ |
OLD | NEW |