summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/extensions
diff options
context:
space:
mode:
authortzik@google.com <tzik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-22 09:30:28 +0000
committertzik@google.com <tzik@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-22 09:30:28 +0000
commitfb0fc20c8a2c6efe7fdedac1ceb340c22fe95efc (patch)
treea2d1cbf3859dc74f7f82b28fb85c4cb498cc097e /chrome/browser/chromeos/extensions
parent8046f202114590cfd16e4c2ee51a74e7fe097804 (diff)
downloadchromium_src-fb0fc20c8a2c6efe7fdedac1ceb340c22fe95efc.zip
chromium_src-fb0fc20c8a2c6efe7fdedac1ceb340c22fe95efc.tar.gz
chromium_src-fb0fc20c8a2c6efe7fdedac1ceb340c22fe95efc.tar.bz2
Rename namespace 'gdata' to 'google_apis', since it is now now irrelevant.
BUG=155469 TBR=estade@chromium.org Review URL: https://codereview.chromium.org/11180002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/extensions')
-rw-r--r--chrome/browser/chromeos/extensions/external_filesystem_apitest.cc17
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.cc11
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.h7
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.cc6
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_private_api.h2
-rw-r--r--chrome/browser/chromeos/extensions/file_manager_util.cc9
-rw-r--r--chrome/browser/chromeos/extensions/file_manager_util.h2
7 files changed, 29 insertions, 25 deletions
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
index 0d6df25..e259737 100644
--- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
@@ -364,14 +364,15 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
scoped_ptr<base::Value> dir_value(LoadJSONFile(kTestDirectory));
EXPECT_CALL(*mock_drive_service_,
CreateDirectory(_, _, _))
- .WillOnce(MockCreateDirectoryCallback(gdata::HTTP_SUCCESS, &dir_value));
+ .WillOnce(MockCreateDirectoryCallback(
+ google_apis::HTTP_SUCCESS, &dir_value));
// Then the test will try to read an existing file file.
// Remote filesystem should first request root feed from gdata server.
scoped_ptr<base::Value> documents_value(LoadJSONFile(kTestRootFeed));
EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, _, _, _))
- .WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
+ .WillOnce(MockGetDocumentsCallback(google_apis::HTTP_SUCCESS,
&documents_value));
// When file browser tries to read the file, remote filesystem should detect
@@ -385,7 +386,7 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
LoadJSONFile(kTestDocumentToDownloadEntry));
EXPECT_CALL(*mock_drive_service_,
GetDocumentEntry("file:1_file_resource_id", _))
- .WillOnce(MockGetDocumentEntryCallback(gdata::HTTP_SUCCESS,
+ .WillOnce(MockGetDocumentEntryCallback(google_apis::HTTP_SUCCESS,
&document_to_download_value));
// We expect to download url defined in document entry returned by
@@ -393,7 +394,7 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest,
EXPECT_CALL(*mock_drive_service_,
DownloadFile(_, _, GURL("https://file_content_url_changed"),
_, _))
- .WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS));
+ .WillOnce(MockDownloadFileCallback(google_apis::HTTP_SUCCESS));
// On exit, all operations in progress should be cancelled.
EXPECT_CALL(*mock_drive_service_, CancelAll());
@@ -411,14 +412,14 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) {
scoped_ptr<base::Value> documents_value(LoadJSONFile(kTestRootFeed));
EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, "", _, _))
- .WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
+ .WillOnce(MockGetDocumentsCallback(google_apis::HTTP_SUCCESS,
&documents_value));
// We return the whole test file system in serch results.
scoped_ptr<base::Value> search_value(LoadJSONFile(kTestRootFeed));
EXPECT_CALL(*mock_drive_service_,
GetDocuments(_, _, "foo", _, _))
- .WillOnce(MockGetDocumentsCallback(gdata::HTTP_SUCCESS,
+ .WillOnce(MockGetDocumentsCallback(google_apis::HTTP_SUCCESS,
&search_value));
// Test will try to create a snapshot of the returned file.
@@ -426,7 +427,7 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) {
LoadJSONFile(kTestDocumentToDownloadEntry));
EXPECT_CALL(*mock_drive_service_,
GetDocumentEntry("file:1_file_resource_id", _))
- .WillOnce(MockGetDocumentEntryCallback(gdata::HTTP_SUCCESS,
+ .WillOnce(MockGetDocumentEntryCallback(google_apis::HTTP_SUCCESS,
&document_to_download_value));
// We expect to download url defined in document entry returned by
@@ -434,7 +435,7 @@ IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) {
EXPECT_CALL(*mock_drive_service_,
DownloadFile(_, _, GURL("https://file_content_url_changed"),
_, _))
- .WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS));
+ .WillOnce(MockDownloadFileCallback(google_apis::HTTP_SUCCESS));
// On exit, all operations in progress should be cancelled.
EXPECT_CALL(*mock_drive_service_, CancelAll());
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index 5212a6e..5b54564 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -243,13 +243,14 @@ void FileBrowserEventRouter::MountDrive(
void FileBrowserEventRouter::OnAuthenticated(
const base::Closure& callback,
- gdata::GDataErrorCode error,
+ google_apis::GDataErrorCode error,
const std::string& token) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
chromeos::MountError error_code;
// For the file manager to work offline, GDATA_NO_CONNECTION is allowed.
- if (error == gdata::HTTP_SUCCESS || error == gdata::GDATA_NO_CONNECTION)
+ if (error == google_apis::HTTP_SUCCESS ||
+ error == google_apis::GDATA_NO_CONNECTION)
error_code = chromeos::MOUNT_ERROR_NONE;
else
error_code = chromeos::MOUNT_ERROR_NOT_AUTHENTICATED;
@@ -418,7 +419,7 @@ void FileBrowserEventRouter::Observe(
}
void FileBrowserEventRouter::OnProgressUpdate(
- const gdata::OperationProgressStatusList& list) {
+ const google_apis::OperationProgressStatusList& list) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
scoped_ptr<ListValue> event_list(
@@ -476,10 +477,10 @@ void FileBrowserEventRouter::OnFileSystemBeingUnmounted() {
}
void FileBrowserEventRouter::OnAuthenticationFailed(
- gdata::GDataErrorCode error) {
+ google_apis::GDataErrorCode error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (error == gdata::GDATA_NO_CONNECTION)
+ if (error == google_apis::GDATA_NO_CONNECTION)
return;
// Raise a MountCompleted event to notify the File Manager.
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index 7f6f12c..1567dc1 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -86,8 +86,9 @@ class FileBrowserEventRouter
// drive::DriveServiceObserver overrides.
virtual void OnProgressUpdate(
- const gdata::OperationProgressStatusList& list) OVERRIDE;
- virtual void OnAuthenticationFailed(gdata::GDataErrorCode error) OVERRIDE;
+ const google_apis::OperationProgressStatusList& list) OVERRIDE;
+ virtual void OnAuthenticationFailed(
+ google_apis::GDataErrorCode error) OVERRIDE;
// drive::DriveFileSystemInterface::Observer overrides.
virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE;
@@ -200,7 +201,7 @@ class FileBrowserEventRouter
// Used to implement MountDrive(). Called after the authentication.
void OnAuthenticated(const base::Closure& callback,
- gdata::GDataErrorCode error,
+ google_apis::GDataErrorCode error,
const std::string& tokeni);
scoped_refptr<FileWatcherDelegate> delegate_;
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 545d968..cd8fb98 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -80,7 +80,7 @@ using content::SiteInstance;
using content::WebContents;
using extensions::Extension;
using file_handler_util::FileTaskExecutor;
-using gdata::InstalledApp;
+using google_apis::InstalledApp;
namespace {
@@ -2434,7 +2434,7 @@ void GetDriveFilesFunction::GetFileOrSendResponse() {
system_service->file_system()->GetFileByPath(
drive_path,
base::Bind(&GetDriveFilesFunction::OnFileReady, this),
- gdata::GetContentCallback());
+ google_apis::GetContentCallback());
}
@@ -2477,7 +2477,7 @@ ListValue* GetFileTransfersFunction::GetFileTransfersList() {
if (!system_service)
return NULL;
- gdata::OperationProgressStatusList list =
+ google_apis::OperationProgressStatusList list =
system_service->drive_service()->GetProgressStatusList();
return file_manager_util::ProgressStatusVectorToListValue(
profile_, source_url_.GetOrigin(), list);
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index a4836b0..e15b5d4 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -709,7 +709,7 @@ class SearchDriveFunction : public AsyncExtensionFunction {
void OnFileSystemOpened(base::PlatformFileError result,
const std::string& file_system_name,
const GURL& file_system_url);
- // Callback for gdata::SearchAsync called after file system is opened.
+ // Callback for google_apis::SearchAsync called after file system is opened.
void OnSearch(drive::DriveFileError error,
const GURL& next_feed,
scoped_ptr<std::vector<drive::SearchResultInfo> > result_paths);
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc
index 99e919e..6cfc6f4 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager_util.cc
@@ -185,7 +185,7 @@ std::string GetDialogTypeAsString(
DictionaryValue* ProgessStatusToDictionaryValue(
Profile* profile,
const GURL& origin_url,
- const gdata::OperationProgressStatus& status) {
+ const google_apis::OperationProgressStatus& status) {
scoped_ptr<DictionaryValue> result(new DictionaryValue());
GURL file_url;
if (file_manager_util::ConvertFileToFileSystemUrl(profile,
@@ -754,7 +754,7 @@ bool ExecuteBuiltinHandler(Browser* browser, const FilePath& path,
system_service->file_system()->GetFileByPath(
drive::util::ExtractDrivePath(path),
base::Bind(&OnCRXDownloadCallback, browser),
- gdata::GetContentCallback());
+ google_apis::GetContentCallback());
} else {
InstallCRX(browser, path);
}
@@ -809,9 +809,10 @@ bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension) {
ListValue* ProgressStatusVectorToListValue(
Profile* profile, const GURL& origin_url,
- const gdata::OperationProgressStatusList& list) {
+ const google_apis::OperationProgressStatusList& list) {
scoped_ptr<ListValue> result_list(new ListValue());
- for (gdata::OperationProgressStatusList::const_iterator iter = list.begin();
+ for (google_apis::OperationProgressStatusList::const_iterator iter =
+ list.begin();
iter != list.end(); ++iter) {
result_list->Append(
ProgessStatusToDictionaryValue(profile, origin_url, *iter));
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.h b/chrome/browser/chromeos/extensions/file_manager_util.h
index a9a16c1..6d1dad3 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.h
+++ b/chrome/browser/chromeos/extensions/file_manager_util.h
@@ -91,7 +91,7 @@ bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension);
// Converts the vector of progress status to their JSON (Value) form.
base::ListValue* ProgressStatusVectorToListValue(
Profile* profile, const GURL& origin_url,
- const gdata::OperationProgressStatusList& list);
+ const google_apis::OperationProgressStatusList& list);
} // namespace file_manager_util