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

Unified Diff: chrome/browser/chromeos/gdata/gdata_contacts_service.cc

Issue 10831122: gdata cleanup: stop passing Profile* around GData operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_contacts_service.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_contacts_service.cc b/chrome/browser/chromeos/gdata/gdata_contacts_service.cc
index 16f49ad4ff536ad77199447c6f3191342153086a..fb550dd804bccd8f06a9873689a21280645abe4a 100644
--- a/chrome/browser/chromeos/gdata/gdata_contacts_service.cc
+++ b/chrome/browser/chromeos/gdata/gdata_contacts_service.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/chromeos/gdata/gdata_operations.h"
#include "chrome/browser/chromeos/gdata/gdata_params.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
-#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
@@ -317,14 +316,12 @@ class GDataContactsService::DownloadContactsRequest
: public base::SupportsWeakPtr<DownloadContactsRequest> {
public:
DownloadContactsRequest(GDataContactsService* service,
- Profile* profile,
GDataOperationRunner* runner,
SuccessCallback success_callback,
FailureCallback failure_callback,
const base::Time& min_update_time,
int max_simultaneous_photo_downloads)
: service_(service),
- profile_(profile),
runner_(runner),
success_callback_(success_callback),
failure_callback_(failure_callback),
@@ -334,14 +331,12 @@ class GDataContactsService::DownloadContactsRequest
num_in_progress_photo_downloads_(0),
photo_download_failed_(false) {
DCHECK(service_);
- DCHECK(profile_);
DCHECK(runner_);
}
~DownloadContactsRequest() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
service_ = NULL;
- profile_ = NULL;
runner_ = NULL;
}
@@ -350,7 +345,6 @@ class GDataContactsService::DownloadContactsRequest
GetContactsOperation* operation =
new GetContactsOperation(
runner_->operation_registry(),
- profile_,
min_update_time_,
base::Bind(&DownloadContactsRequest::HandleFeedData,
base::Unretained(this)));
@@ -494,7 +488,6 @@ class GDataContactsService::DownloadContactsRequest
runner_->StartOperationWithRetry(
new GetContactPhotoOperation(
runner_->operation_registry(),
- profile_,
GURL(url),
base::Bind(&DownloadContactsRequest::HandlePhotoData,
AsWeakPtr(), contact)));
@@ -531,7 +524,6 @@ class GDataContactsService::DownloadContactsRequest
typedef std::map<contacts::Contact*, std::string> ContactPhotoUrls;
GDataContactsService* service_; // not owned
- Profile* profile_; // not owned
GDataOperationRunner* runner_; // not owned
SuccessCallback success_callback_;
@@ -562,11 +554,9 @@ class GDataContactsService::DownloadContactsRequest
};
GDataContactsService::GDataContactsService(Profile* profile)
- : profile_(profile),
- runner_(new GDataOperationRunner(profile)),
+ : runner_(new GDataOperationRunner(profile)),
max_simultaneous_photo_downloads_(kMaxSimultaneousPhotoDownloads) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(profile_);
}
GDataContactsService::~GDataContactsService() {
@@ -591,7 +581,6 @@ void GDataContactsService::DownloadContacts(SuccessCallback success_callback,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DownloadContactsRequest* request =
new DownloadContactsRequest(this,
- profile_,
runner_.get(),
success_callback,
failure_callback,
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_auth_service.cc ('k') | chrome/browser/chromeos/gdata/gdata_documents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698