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_GDATA_OPERATION_RUNNER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATION_RUNNER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATION_RUNNER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATION_RUNNER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void RetryOperation(GDataOperationInterface* operation); | 62 void RetryOperation(GDataOperationInterface* operation); |
63 | 63 |
64 private: | 64 private: |
65 // GDataAuthService::Observer override. | 65 // GDataAuthService::Observer override. |
66 virtual void OnOAuth2RefreshTokenChanged() OVERRIDE; | 66 virtual void OnOAuth2RefreshTokenChanged() OVERRIDE; |
67 | 67 |
68 Profile* profile_; // not owned | 68 Profile* profile_; // not owned |
69 | 69 |
70 scoped_ptr<GDataAuthService> auth_service_; | 70 scoped_ptr<GDataAuthService> auth_service_; |
71 scoped_ptr<GDataOperationRegistry> operation_registry_; | 71 scoped_ptr<GDataOperationRegistry> operation_registry_; |
72 | |
73 // Note: This should remain the last member so it'll be destroyed and | |
74 // invalidate its weak pointers before any other members are destroyed. | |
75 base::WeakPtrFactory<GDataOperationRunner> weak_ptr_factory_; | 72 base::WeakPtrFactory<GDataOperationRunner> weak_ptr_factory_; |
| 73 base::WeakPtr<GDataOperationRunner> weak_ptr_bound_to_ui_thread_; |
76 | 74 |
77 DISALLOW_COPY_AND_ASSIGN(GDataOperationRunner); | 75 DISALLOW_COPY_AND_ASSIGN(GDataOperationRunner); |
78 }; | 76 }; |
79 | 77 |
80 } // namespace gdata | 78 } // namespace gdata |
81 | 79 |
82 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATION_RUNNER_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATION_RUNNER_H_ |
OLD | NEW |