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

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

Issue 10533042: Remove chromeos::GDataFileSystem::GetOperationRegistry() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove include Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
index 2c4258aaca861b66132844ca472ac4f4d9a8f88a..c00f0c8747536155a63c84bdf1f38f4ec8d63839 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -18,6 +18,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_files.h"
+#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -84,19 +85,24 @@ bool ParseDriveUrl(const std::string& path, std::string* resource_id) {
} // namespace
+// Helper function to get GDataSystemService from Profile.
achuithb 2012/06/07 09:55:39 Any reason why this is not in the anonymous namesp
hashimoto 2012/06/07 10:11:57 Oops, done
achuithb 2012/06/07 10:24:43 Is it possible to also move all the other function
hashimoto 2012/06/07 16:16:21 Done.
+GDataSystemService* GetSystemService() {
+ return GDataSystemServiceFactory::GetForProfile(
+ ProfileManager::GetDefaultProfile());
+}
+
// Helper function to get GDataFileSystem from Profile on UI thread.
void GetFileSystemOnUIThread(GDataFileSystem** file_system) {
- GDataSystemService* system_service = GDataSystemServiceFactory::GetForProfile(
- ProfileManager::GetDefaultProfile());
+ GDataSystemService* system_service = GetSystemService();
*file_system = system_service ? system_service->file_system() : NULL;
}
// Helper function to cancel GData download operation on UI thread.
void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) {
- GDataFileSystem* file_system = NULL;
- GetFileSystemOnUIThread(&file_system);
- if (file_system)
- file_system->GetOperationRegistry()->CancelForFilePath(gdata_file_path);
+ GDataSystemService* system_service = GetSystemService();
+ if (system_service)
+ system_service->docs_service()->operation_registry()->CancelForFilePath(
+ gdata_file_path);
}
// GDataURLRequesetJob is the gateway between network-level drive://...
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698