| 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 #include "chrome/browser/google_apis/gdata_wapi_service.h" | 5 #include "chrome/browser/google_apis/gdata_wapi_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 callback.Run(error, app_list.Pass()); | 91 callback.Run(error, app_list.Pass()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace | 94 } // namespace |
| 95 | 95 |
| 96 GDataWapiService::GDataWapiService( | 96 GDataWapiService::GDataWapiService( |
| 97 net::URLRequestContextGetter* url_request_context_getter, | 97 net::URLRequestContextGetter* url_request_context_getter, |
| 98 const GURL& base_url, | 98 const GURL& base_url, |
| 99 const std::string& custom_user_agent) | 99 const std::string& custom_user_agent) |
| 100 : url_request_context_getter_(url_request_context_getter), | 100 : url_request_context_getter_(url_request_context_getter), |
| 101 sender_(NULL), | |
| 102 url_generator_(base_url), | 101 url_generator_(base_url), |
| 103 custom_user_agent_(custom_user_agent) { | 102 custom_user_agent_(custom_user_agent) { |
| 104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 103 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 105 } | 104 } |
| 106 | 105 |
| 107 GDataWapiService::~GDataWapiService() { | 106 GDataWapiService::~GDataWapiService() { |
| 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 107 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 109 if (sender_.get()) | 108 if (sender_.get()) |
| 110 sender_->auth_service()->RemoveObserver(this); | 109 sender_->auth_service()->RemoveObserver(this); |
| 111 } | 110 } |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 if (CanSendRequest()) { | 598 if (CanSendRequest()) { |
| 600 FOR_EACH_OBSERVER( | 599 FOR_EACH_OBSERVER( |
| 601 DriveServiceObserver, observers_, OnReadyToSendRequests()); | 600 DriveServiceObserver, observers_, OnReadyToSendRequests()); |
| 602 } else if (!HasRefreshToken()) { | 601 } else if (!HasRefreshToken()) { |
| 603 FOR_EACH_OBSERVER( | 602 FOR_EACH_OBSERVER( |
| 604 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); | 603 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); |
| 605 } | 604 } |
| 606 } | 605 } |
| 607 | 606 |
| 608 } // namespace google_apis | 607 } // namespace google_apis |
| OLD | NEW |