Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Side by Side Diff: chrome/browser/google_apis/drive_api_service.cc

Issue 16703018: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/drive_api_service.h" 5 #include "chrome/browser/google_apis/drive_api_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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const char kDriveApiRootDirectoryResourceId[] = "root"; 218 const char kDriveApiRootDirectoryResourceId[] = "root";
219 219
220 } // namespace 220 } // namespace
221 221
222 DriveAPIService::DriveAPIService( 222 DriveAPIService::DriveAPIService(
223 net::URLRequestContextGetter* url_request_context_getter, 223 net::URLRequestContextGetter* url_request_context_getter,
224 const GURL& base_url, 224 const GURL& base_url,
225 const std::string& custom_user_agent) 225 const std::string& custom_user_agent)
226 : url_request_context_getter_(url_request_context_getter), 226 : url_request_context_getter_(url_request_context_getter),
227 profile_(NULL), 227 profile_(NULL),
228 sender_(NULL),
229 url_generator_(base_url), 228 url_generator_(base_url),
230 custom_user_agent_(custom_user_agent) { 229 custom_user_agent_(custom_user_agent) {
231 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 230 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
232 } 231 }
233 232
234 DriveAPIService::~DriveAPIService() { 233 DriveAPIService::~DriveAPIService() {
235 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 234 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
236 if (sender_.get()) 235 if (sender_.get())
237 sender_->auth_service()->RemoveObserver(this); 236 sender_->auth_service()->RemoveObserver(this);
238 } 237 }
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 if (CanSendRequest()) { 740 if (CanSendRequest()) {
742 FOR_EACH_OBSERVER( 741 FOR_EACH_OBSERVER(
743 DriveServiceObserver, observers_, OnReadyToSendRequests()); 742 DriveServiceObserver, observers_, OnReadyToSendRequests());
744 } else if (!HasRefreshToken()) { 743 } else if (!HasRefreshToken()) {
745 FOR_EACH_OBSERVER( 744 FOR_EACH_OBSERVER(
746 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 745 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
747 } 746 }
748 } 747 }
749 748
750 } // namespace google_apis 749 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698