| 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_FAKE_DRIVE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_FAKE_DRIVE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_APIS_FAKE_DRIVE_SERVICE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_FAKE_DRIVE_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/google_apis/drive_service_interface.h" | 9 #include "chrome/browser/google_apis/drive_service_interface.h" |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 // Returns a pointer to the entry that matches |resource_id|, or NULL if | 137 // Returns a pointer to the entry that matches |resource_id|, or NULL if |
| 138 // not found. | 138 // not found. |
| 139 base::DictionaryValue* FindEntryByResourceId(const std::string& resource_id); | 139 base::DictionaryValue* FindEntryByResourceId(const std::string& resource_id); |
| 140 | 140 |
| 141 // Returns a pointer to the entry that matches |content_url|, or NULL if | 141 // Returns a pointer to the entry that matches |content_url|, or NULL if |
| 142 // not found. | 142 // not found. |
| 143 base::DictionaryValue* FindEntryByContentUrl(const GURL& content_url); | 143 base::DictionaryValue* FindEntryByContentUrl(const GURL& content_url); |
| 144 | 144 |
| 145 // Returns a pointer to the entry that matches |upload_url|, or NULL if |
| 146 // not found. |
| 147 base::DictionaryValue* FindEntryByUploadUrl(const GURL& upload_url); |
| 148 |
| 145 // Returns a new resource ID, which looks like "resource_id_<num>" where | 149 // Returns a new resource ID, which looks like "resource_id_<num>" where |
| 146 // <num> is a monotonically increasing number starting from 1. | 150 // <num> is a monotonically increasing number starting from 1. |
| 147 std::string GetNewResourceId(); | 151 std::string GetNewResourceId(); |
| 148 | 152 |
| 149 // Increments |largest_changestamp_| and adds the new changestamp to | 153 // Increments |largest_changestamp_| and adds the new changestamp to |
| 150 // |entry|. | 154 // |entry|. |
| 151 void AddNewChangestamp(base::DictionaryValue* entry); | 155 void AddNewChangestamp(base::DictionaryValue* entry); |
| 152 | 156 |
| 153 scoped_ptr<base::Value> resource_list_value_; | 157 scoped_ptr<base::Value> resource_list_value_; |
| 154 scoped_ptr<base::Value> account_metadata_value_; | 158 scoped_ptr<base::Value> account_metadata_value_; |
| 155 scoped_ptr<base::Value> app_info_value_; | 159 scoped_ptr<base::Value> app_info_value_; |
| 156 int64 largest_changestamp_; | 160 int64 largest_changestamp_; |
| 157 int default_max_results_; | 161 int default_max_results_; |
| 158 int resource_id_count_; | 162 int resource_id_count_; |
| 159 int resource_list_load_count_; | 163 int resource_list_load_count_; |
| 160 int account_metadata_load_count_; | 164 int account_metadata_load_count_; |
| 161 bool offline_; | 165 bool offline_; |
| 162 | 166 |
| 163 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); | 167 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); |
| 164 }; | 168 }; |
| 165 | 169 |
| 166 } // namespace google_apis | 170 } // namespace google_apis |
| 167 | 171 |
| 168 #endif // CHROME_BROWSER_GOOGLE_APIS_FAKE_DRIVE_SERVICE_H_ | 172 #endif // CHROME_BROWSER_GOOGLE_APIS_FAKE_DRIVE_SERVICE_H_ |
| OLD | NEW |