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_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 GDataErrorCode fetch_error_code) OVERRIDE; | 199 GDataErrorCode fetch_error_code) OVERRIDE; |
200 void RunCallback(GDataErrorCode fetch_error_code, | 200 void RunCallback(GDataErrorCode fetch_error_code, |
201 scoped_ptr<base::Value> value); | 201 scoped_ptr<base::Value> value); |
202 | 202 |
203 private: | 203 private: |
204 // Called when ParseJsonOnBlockingPool() is completed. | 204 // Called when ParseJsonOnBlockingPool() is completed. |
205 void OnDataParsed(gdata::GDataErrorCode fetch_error_code, | 205 void OnDataParsed(gdata::GDataErrorCode fetch_error_code, |
206 scoped_ptr<base::Value>* value); | 206 scoped_ptr<base::Value>* value); |
207 | 207 |
208 GetDataCallback callback_; | 208 GetDataCallback callback_; |
209 | |
210 // Note: This should remain the last member so it'll be destroyed and | |
211 // invalidate its weak pointers before any other members are destroyed. | |
212 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; | 209 base::WeakPtrFactory<GetDataOperation> weak_ptr_factory_; |
213 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); | 210 DISALLOW_COPY_AND_ASSIGN(GetDataOperation); |
214 }; | 211 }; |
215 | 212 |
216 } // namespace gdata | 213 } // namespace gdata |
217 | 214 |
218 #endif // CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ | 215 #endif // CHROME_BROWSER_CHROMEOS_GDATA_OPERATIONS_BASE_H_ |
OLD | NEW |