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

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

Issue 10837338: Remove "GData" prefix from non-GData specific classes (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/operation_runner.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc b/chrome/browser/chromeos/gdata/operation_runner.cc
similarity index 72%
rename from chrome/browser/chromeos/gdata/gdata_operation_runner.cc
rename to chrome/browser/chromeos/gdata/operation_runner.cc
index 2bd8151f4a03ffa900b8aea3824e46f69eeaedb7..6f31d1692094e0a90012b982315063648a4db77a 100644
--- a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc
+++ b/chrome/browser/chromeos/gdata/operation_runner.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/chromeos/gdata/gdata_operation_runner.h"
+#include "chrome/browser/chromeos/gdata/operation_runner.h"
#include "base/bind.h"
#include "chrome/browser/chromeos/gdata/gdata_operations.h"
@@ -13,54 +13,54 @@ using content::BrowserThread;
namespace gdata {
-GDataOperationRunner::GDataOperationRunner(Profile* profile)
+OperationRunner::OperationRunner(Profile* profile)
: profile_(profile),
- auth_service_(new GDataAuthService()),
- operation_registry_(new GDataOperationRegistry()),
+ auth_service_(new AuthService()),
+ operation_registry_(new OperationRegistry()),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->AddObserver(this);
}
-GDataOperationRunner::~GDataOperationRunner() {
+OperationRunner::~OperationRunner() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->RemoveObserver(this);
}
-void GDataOperationRunner::Initialize() {
+void OperationRunner::Initialize() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->Initialize(profile_);
}
-void GDataOperationRunner::CancelAll() {
+void OperationRunner::CancelAll() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
operation_registry_->CancelAll();
}
-void GDataOperationRunner::Authenticate(const AuthStatusCallback& callback) {
+void OperationRunner::Authenticate(const AuthStatusCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->StartAuthentication(operation_registry_.get(), callback);
}
-void GDataOperationRunner::StartOperationWithRetry(
+void OperationRunner::StartOperationWithRetry(
GDataOperationInterface* operation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// The re-authenticatation callback will run on UI thread.
operation->SetReAuthenticateCallback(
- base::Bind(&GDataOperationRunner::RetryOperation,
+ base::Bind(&OperationRunner::RetryOperation,
weak_ptr_factory_.GetWeakPtr()));
StartOperation(operation);
}
-void GDataOperationRunner::StartOperation(GDataOperationInterface* operation) {
+void OperationRunner::StartOperation(GDataOperationInterface* operation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!auth_service_->HasAccessToken()) {
// Fetch OAuth2 authentication token from the refresh token first.
auth_service_->StartAuthentication(
operation_registry_.get(),
- base::Bind(&GDataOperationRunner::OnOperationAuthRefresh,
+ base::Bind(&OperationRunner::OnOperationAuthRefresh,
weak_ptr_factory_.GetWeakPtr(),
operation));
return;
@@ -69,7 +69,7 @@ void GDataOperationRunner::StartOperation(GDataOperationInterface* operation) {
operation->Start(auth_service_->access_token());
}
-void GDataOperationRunner::OnOperationAuthRefresh(
+void OperationRunner::OnOperationAuthRefresh(
GDataOperationInterface* operation,
GDataErrorCode code,
const std::string& auth_token) {
@@ -83,7 +83,7 @@ void GDataOperationRunner::OnOperationAuthRefresh(
}
}
-void GDataOperationRunner::RetryOperation(GDataOperationInterface* operation) {
+void OperationRunner::RetryOperation(GDataOperationInterface* operation) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->ClearAccessToken();
@@ -92,7 +92,7 @@ void GDataOperationRunner::RetryOperation(GDataOperationInterface* operation) {
StartOperation(operation);
}
-void GDataOperationRunner::OnOAuth2RefreshTokenChanged() {
+void OperationRunner::OnOAuth2RefreshTokenChanged() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}

Powered by Google App Engine
This is Rietveld 408576698