summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 01:47:27 +0000
committerachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-16 01:47:27 +0000
commitf8e376bb9f0d7991e24d419efb958038ab533cf6 (patch)
treeb4747555cdfb5fe392f6ce39ed6e6b5200013a90
parentb26a4bb098503e0450c740639648640fdf8c56b8 (diff)
downloadchromium_src-f8e376bb9f0d7991e24d419efb958038ab533cf6.zip
chromium_src-f8e376bb9f0d7991e24d419efb958038ab533cf6.tar.gz
chromium_src-f8e376bb9f0d7991e24d419efb958038ab533cf6.tar.bz2
Get rid of Authenticate from GDataFileSystem.
BUG=NONE TEST=compiles, unit_tests pass. Review URL: https://chromiumcodereview.appspot.com/10559019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142558 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.cc2
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system.cc9
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system.h8
-rw-r--r--chrome/browser/chromeos/gdata/mock_gdata_file_system.h1
4 files changed, 2 insertions, 18 deletions
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index b4f41f4..11c3d00 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -938,7 +938,7 @@ bool AddMountFunction::RunImpl() {
gdata::GDataSystemService* system_service =
gdata::GDataSystemServiceFactory::GetForProfile(profile_);
if (system_service) {
- system_service->file_system()->Authenticate(
+ system_service->docs_service()->Authenticate(
base::Bind(&AddMountFunction::OnGDataAuthentication,
this));
}
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 10e4c36..308620e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -798,13 +798,6 @@ void GDataFileSystem::StopUpdates() {
update_timer_.Stop();
}
-void GDataFileSystem::Authenticate(const AuthStatusCallback& callback) {
- // TokenFetcher, used in DocumentsService, must be run on UI thread.
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- documents_service_->Authenticate(callback);
-}
-
void GDataFileSystem::FindEntryByResourceId(const std::string& resource_id,
const FindEntryCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
@@ -1749,7 +1742,7 @@ void GDataFileSystem::OnGetFileInfoCompleteForGetFileByPath(
scoped_ptr<GDataFileProto> file_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!file_info->gdata_entry().resource_id().empty());
+ DCHECK(file_info.get() && !file_info->gdata_entry().resource_id().empty());
GetResolvedFileByPath(file_path,
get_file_callback,
get_download_data_callback,
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h
index 561de74..ec86275 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h
@@ -157,13 +157,6 @@ class GDataFileSystemInterface {
// Checks for updates on the server.
virtual void CheckForUpdates() = 0;
- // Authenticates the user by fetching the auth token as
- // needed. |callback| will be run with the error code and the auth
- // token, on the thread this function is run.
- //
- // Must be called on UI thread.
- virtual void Authenticate(const AuthStatusCallback& callback) = 0;
-
// Finds file info by using |resource_id|. This call does not initiate
// content refreshing.
//
@@ -396,7 +389,6 @@ class GDataFileSystem : public GDataFileSystemInterface,
virtual void StartUpdates() OVERRIDE;
virtual void StopUpdates() OVERRIDE;
virtual void CheckForUpdates() OVERRIDE;
- virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE;
virtual void FindEntryByResourceId(
const std::string& resource_id,
const FindEntryCallback& callback) OVERRIDE;
diff --git a/chrome/browser/chromeos/gdata/mock_gdata_file_system.h b/chrome/browser/chromeos/gdata/mock_gdata_file_system.h
index 6ccbf8b..e30d38f 100644
--- a/chrome/browser/chromeos/gdata/mock_gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/mock_gdata_file_system.h
@@ -26,7 +26,6 @@ class MockGDataFileSystem : public GDataFileSystemInterface {
MOCK_METHOD0(StartUpdates, void());
MOCK_METHOD0(StopUpdates, void());
MOCK_METHOD0(CheckForUpdates, void());
- MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback));
MOCK_METHOD2(FindEntryByResourceId,
void(const std::string& resource_id,
const FindEntryCallback& callback));