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_AUTH_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_AUTH_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_AUTH_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_AUTH_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 GDataOperationRegistry* registry, | 91 GDataOperationRegistry* registry, |
92 scoped_refptr<base::MessageLoopProxy> relay_proxy, | 92 scoped_refptr<base::MessageLoopProxy> relay_proxy, |
93 const AuthStatusCallback& callback); | 93 const AuthStatusCallback& callback); |
94 | 94 |
95 Profile* profile_; | 95 Profile* profile_; |
96 std::string refresh_token_; | 96 std::string refresh_token_; |
97 std::string access_token_; | 97 std::string access_token_; |
98 ObserverList<Observer> observers_; | 98 ObserverList<Observer> observers_; |
99 | 99 |
100 content::NotificationRegistrar registrar_; | 100 content::NotificationRegistrar registrar_; |
| 101 |
| 102 // Note: This should remain the last member so it'll be destroyed and |
| 103 // invalidate its weak pointers before any other members are destroyed. |
101 base::WeakPtrFactory<GDataAuthService> weak_ptr_factory_; | 104 base::WeakPtrFactory<GDataAuthService> weak_ptr_factory_; |
102 base::WeakPtr<GDataAuthService> weak_ptr_bound_to_ui_thread_; | |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(GDataAuthService); | 106 DISALLOW_COPY_AND_ASSIGN(GDataAuthService); |
105 }; | 107 }; |
106 | 108 |
107 } // namespace gdata | 109 } // namespace gdata |
108 | 110 |
109 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_AUTH_SERVICE_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_AUTH_SERVICE_H_ |
OLD | NEW |