diff options
author | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 09:22:36 +0000 |
---|---|---|
committer | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 09:22:36 +0000 |
commit | 885a4e98b4ffb8c40b90ba1bfa1c8dad8ae65f9e (patch) | |
tree | f7bf7c143385318f91e892dbb8df743f3acb7729 | |
parent | 13eb3d6b38d7033b93e02e3082ca6601d2740247 (diff) | |
download | chromium_src-885a4e98b4ffb8c40b90ba1bfa1c8dad8ae65f9e.zip chromium_src-885a4e98b4ffb8c40b90ba1bfa1c8dad8ae65f9e.tar.gz chromium_src-885a4e98b4ffb8c40b90ba1bfa1c8dad8ae65f9e.tar.bz2 |
Revert 127107 - Implemented API for tracking ongoing file transfers from file manager.
new method:
chrome.fileManagerPrivate.getFileTransfers(function(transfers) {
});
new event:
chrome.fileManagerPrivate.onFileTransfersUpdated.addListener(function(transfers) {
});
where:
transfers = [
{
'fileUrl': 'filesystem://.../external/gdata/myfile.txt',
'transferState': 'started|in_progress|completed|failed',
'transferType': 'upload|download',
'processed': 1234,
'total': 54331
},
...
]
BUG=chromium-os:27819
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9703042
TBR=zelidrag@chromium.org
Reverted due to
BUG=118573 - many leaks detected on HeapChecker and Valgrind CrOS bots.
Review URL: https://chromiumcodereview.appspot.com/9703106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127134 0039d316-1c4b-4281-b951-d872f2087c98
17 files changed, 12 insertions, 299 deletions
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc index ee14ea5..e16ff38 100644 --- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc +++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc @@ -16,8 +16,6 @@ #include "chrome/browser/extensions/extension_event_router.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/chrome_notification_types.h" -#include "content/public/browser/notification_source.h" #include "grit/generated_resources.h" #include "webkit/fileapi/file_system_types.h" #include "webkit/fileapi/file_system_util.h" @@ -80,9 +78,6 @@ ExtensionFileBrowserEventRouter::ExtensionFileBrowserEventRouter( : delegate_(new ExtensionFileBrowserEventRouter::FileWatcherDelegate(this)), notifications_(new FileBrowserNotifications(profile)), profile_(profile) { - registrar_.Add(this, - chrome::NOTIFICATION_PROFILE_DESTROYED, - content::Source<Profile>(profile_)); } ExtensionFileBrowserEventRouter::~ExtensionFileBrowserEventRouter() { @@ -97,41 +92,17 @@ ExtensionFileBrowserEventRouter::~ExtensionFileBrowserEventRouter() { DiskMountManager::GetInstance()->RemoveObserver(this); } -void ExtensionFileBrowserEventRouter::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - if (chrome::NOTIFICATION_PROFILE_DESTROYED == type) { - gdata::GDataFileSystem* file_system = - gdata::GDataFileSystemFactory::GetForProfile(profile_); - if (!file_system) { - NOTREACHED(); - return; - } - file_system->RemoveOperationObserver(this); - } -} - void ExtensionFileBrowserEventRouter::ObserveFileSystemEvents() { if (!profile_) { NOTREACHED(); return; } - if (!chromeos::UserManager::Get()->IsUserLoggedIn()) - return; - - DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); - disk_mount_manager->RemoveObserver(this); - disk_mount_manager->AddObserver(this); - disk_mount_manager->RequestMountInfoRefresh(); - - gdata::GDataFileSystem* file_system = - gdata::GDataFileSystemFactory::GetForProfile(profile_); - if (!file_system) { - NOTREACHED(); - return; + if (chromeos::UserManager::Get()->IsUserLoggedIn()) { + DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); + disk_mount_manager->RemoveObserver(this); + disk_mount_manager->AddObserver(this); + disk_mount_manager->RequestMountInfoRefresh(); } - file_system->AddOperationObserver(this); } // File watch setup routines. @@ -231,25 +202,6 @@ void ExtensionFileBrowserEventRouter::MountCompleted( } } -void ExtensionFileBrowserEventRouter::OnProgressUpdate( - const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list) { - scoped_ptr<ListValue> event_list( - file_manager_util::ProgressStatusVectorToListValue( - profile_, - file_manager_util::GetFileBrowserExtensionUrl().GetOrigin(), - list)); - - std::string args_json; - base::JSONWriter::Write(event_list.get(), - &args_json); - - profile_->GetExtensionEventRouter()->DispatchEventToExtension( - std::string(kFileBrowserDomain), - extension_event_names::kOnFileTransfersUpdated, args_json, - NULL, GURL()); -} - - void ExtensionFileBrowserEventRouter::HandleFileWatchNotification( const FilePath& local_path, bool got_error) { base::AutoLock lock(lock_); diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h index 1a4948d..e546455 100644 --- a/chrome/browser/chromeos/extensions/file_browser_event_router.h +++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,10 +16,6 @@ #include "base/string16.h" #include "base/synchronization/lock.h" #include "chrome/browser/chromeos/disks/disk_mount_manager.h" -#include "chrome/browser/chromeos/gdata/gdata_file_system.h" -#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" class FileBrowserNotifications; class Profile; @@ -27,9 +23,7 @@ class Profile; // Used to monitor disk mount changes and signal when new mounted usb device is // found. class ExtensionFileBrowserEventRouter - : public chromeos::disks::DiskMountManager::Observer, - public gdata::GDataOperationRegistry::Observer, - public content::NotificationObserver { + : public chromeos::disks::DiskMountManager::Observer { public: explicit ExtensionFileBrowserEventRouter(Profile* profile); virtual ~ExtensionFileBrowserEventRouter(); @@ -56,11 +50,6 @@ class ExtensionFileBrowserEventRouter const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) OVERRIDE; - // GDataOperationRegistry::Observer overrides. - virtual void OnProgressUpdate( - const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list) - OVERRIDE; - private: // Helper class for passing through file watch notification events. class FileWatcherDelegate : public base::files::FilePathWatcher::Delegate { @@ -123,11 +112,6 @@ class ExtensionFileBrowserEventRouter void HandleFileWatchNotification(const FilePath& path, bool got_error); - // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; - // Sends folder change event. void DispatchFolderChangeEvent(const FilePath& path, bool error, const ExtensionUsageRegistry& extensions); @@ -154,7 +138,6 @@ class ExtensionFileBrowserEventRouter scoped_ptr<FileBrowserNotifications> notifications_; Profile* profile_; base::Lock lock_; - content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(ExtensionFileBrowserEventRouter); }; diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc index a4d3328..b19a6e3 100644 --- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc +++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc @@ -17,7 +17,6 @@ #include "chrome/browser/chromeos/extensions/file_handler_util.h" #include "chrome/browser/chromeos/extensions/file_manager_util.h" #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" -#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/extension_process_manager.h" @@ -61,7 +60,6 @@ using content::ChildProcessSecurityPolicy; using content::SiteInstance; using content::WebContents; using file_handler_util::FileTaskExecutor; -using gdata::GDataOperationRegistry; namespace { @@ -1717,31 +1715,3 @@ void GetGDataFilesFunction::OnFileReady( GetFileOrSendResponse(); } -GetFileTransfersFunction::GetFileTransfersFunction() {} - -GetFileTransfersFunction::~GetFileTransfersFunction() {} - -ListValue* GetFileTransfersFunction::GetFileTransfersList() { - gdata::GDataFileSystem* file_system = - gdata::GDataFileSystemFactory::GetForProfile(profile_); - if (!file_system) - return NULL; - - std::vector<gdata::GDataOperationRegistry::ProgressStatus> - list = file_system->GetProgressStatusList(); - return file_manager_util::ProgressStatusVectorToListValue( - profile_, source_url_.GetOrigin(), list); -} - -bool GetFileTransfersFunction::RunImpl() { - scoped_ptr<ListValue> progress_status_list(GetFileTransfersList()); - if (!progress_status_list.get()) { - SendResponse(false); - return false; - } - - result_.reset(progress_status_list.release()); - SendResponse(true); - return true; -} - diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h index 747eb03..6d2bffc 100644 --- a/chrome/browser/chromeos/extensions/file_browser_private_api.h +++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h @@ -481,20 +481,4 @@ class GetGDataFilesFunction : public FileBrowserFunction { DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFiles"); }; -// Implements the chrome.fileBrowserPrivate.executeTask method. -class GetFileTransfersFunction : public AsyncExtensionFunction { - public: - GetFileTransfersFunction(); - virtual ~GetFileTransfersFunction(); - - protected: - // AsyncExtensionFunction overrides. - virtual bool RunImpl() OVERRIDE; - - private: - ListValue* GetFileTransfersList(); - - DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getFileTransfers"); -}; - #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc index caee01b..509a4d3 100644 --- a/chrome/browser/chromeos/extensions/file_manager_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager_util.cc @@ -12,7 +12,6 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/chromeos/extensions/file_handler_util.h" -#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_install_ui.h" #include "chrome/browser/extensions/extension_service.h" @@ -41,17 +40,14 @@ #include "chrome/browser/chromeos/media/media_player.h" #endif -using base::DictionaryValue; -using base::ListValue; using content::BrowserContext; using content::BrowserThread; using content::PluginService; using content::UserMetricsAction; using file_handler_util::FileTaskExecutor; -using gdata::GDataOperationRegistry; -#define FILEBROWSER_EXTENSON_ID "hhaomjibdihmijegdhdafkllkbggdgoj" -const char kFileBrowserDomain[] = FILEBROWSER_EXTENSON_ID; +#define FILEBROWSER_DOMAIN "hhaomjibdihmijegdhdafkllkbggdgoj" +const char kFileBrowserDomain[] = FILEBROWSER_DOMAIN; const char kFileBrowserGalleryTaskId[] = "gallery"; const char kFileBrowserMountArchiveTaskId[] = "mount-archive"; @@ -60,7 +56,7 @@ namespace file_manager_util { namespace { #define FILEBROWSER_URL(PATH) \ - ("chrome-extension://" FILEBROWSER_EXTENSON_ID "/" PATH) + ("chrome-extension://" FILEBROWSER_DOMAIN "/" PATH) // This is the "well known" url for the file manager extension from // browser/resources/file_manager. In the future we may provide a way to swap // out this file manager for an aftermarket part, but not yet. @@ -69,7 +65,7 @@ const char kBaseFileBrowserUrl[] = FILEBROWSER_URL("main.html"); const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html"); const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html"); #undef FILEBROWSER_URL -#undef FILEBROWSER_EXTENSON_ID +#undef FILEBROWSER_DOMAIN const char kCRXExtension[] = ".crx"; const char kPdfExtension[] = ".pdf"; @@ -168,29 +164,6 @@ std::string GetDialogTypeAsString( return type_str; } -DictionaryValue* ProgessStatusToDictionaryValue( - Profile* profile, - const GURL& origin_url, - const GDataOperationRegistry::ProgressStatus& status) { - scoped_ptr<DictionaryValue> result(new DictionaryValue()); - GURL file_url; - if (file_manager_util::ConvertFileToFileSystemUrl(profile, - FilePath(status.file_path), - origin_url, - &file_url)) { - result->SetString("fileUrl", file_url.spec()); - } - - result->SetString("transferState", - GDataOperationRegistry::OperationTransferStateToString( - status.transfer_state)); - result->SetString("transferType", - GDataOperationRegistry::OperationTypeToString(status.operation_type)); - result->SetInteger("processed", static_cast<int>(status.progress_current)); - result->SetInteger("total", static_cast<int>(status.progress_total)); - return result.release(); -} - } // namespace GURL GetFileBrowserExtensionUrl() { @@ -522,18 +495,4 @@ bool ShouldBeOpenedWithPdfPlugin(const char* file_extension) { return plugin_prefs->IsPluginEnabled(plugin); } -ListValue* ProgressStatusVectorToListValue( - Profile* profile, const GURL& origin_url, - const std::vector<GDataOperationRegistry::ProgressStatus>& list) { - scoped_ptr<ListValue> result_list(new ListValue()); - for (std::vector< - GDataOperationRegistry::ProgressStatus>::const_iterator iter = - list.begin(); - iter != list.end(); ++iter) { - result_list->Append( - ProgessStatusToDictionaryValue(profile, origin_url, *iter)); - } - return result_list.release(); -} - } // namespace file_manager_util diff --git a/chrome/browser/chromeos/extensions/file_manager_util.h b/chrome/browser/chromeos/extensions/file_manager_util.h index 9645b8a..7e520ef 100644 --- a/chrome/browser/chromeos/extensions/file_manager_util.h +++ b/chrome/browser/chromeos/extensions/file_manager_util.h @@ -7,19 +7,13 @@ #pragma once #include <string> -#include <vector> #include "base/file_path.h" -#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" #include "chrome/browser/ui/select_file_dialog.h" #include "googleurl/src/gurl.h" class Profile; -namespace base { -class ListValue; -} - extern const char kFileBrowserDomain[]; // File manager helper methods. @@ -74,11 +68,6 @@ void InstallCRX(Profile* profile, const FilePath& full_path); bool ShouldBeOpenedWithPdfPlugin(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 std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list); - } // namespace file_manager_util #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ diff --git a/chrome/browser/chromeos/gdata/gdata.cc b/chrome/browser/chromeos/gdata/gdata.cc index 7bffcb7..9b7d666 100644 --- a/chrome/browser/chromeos/gdata/gdata.cc +++ b/chrome/browser/chromeos/gdata/gdata.cc @@ -196,10 +196,6 @@ void DocumentsService::Initialize(Profile* profile) { gdata_auth_service_->Initialize(profile); } -GDataOperationRegistry* DocumentsService::operation_registry() const { - return operation_registry_.get(); -} - void DocumentsService::CancelAll() { operation_registry_->CancelAll(); } diff --git a/chrome/browser/chromeos/gdata/gdata.h b/chrome/browser/chromeos/gdata/gdata.h index 81295cd..1bf4219 100644 --- a/chrome/browser/chromeos/gdata/gdata.h +++ b/chrome/browser/chromeos/gdata/gdata.h @@ -144,9 +144,6 @@ class DocumentsServiceInterface { // Initializes the documents service tied with |profile|. virtual void Initialize(Profile* profile) = 0; - // Retrieves the operation registry. - virtual GDataOperationRegistry* operation_registry() const = 0; - // Cancels all in-flight operations. virtual void CancelAll() = 0; @@ -272,7 +269,6 @@ class DocumentsService // DocumentsServiceInterface Overrides virtual void Initialize(Profile* profile) OVERRIDE; - virtual GDataOperationRegistry* operation_registry() const OVERRIDE; virtual void CancelAll() OVERRIDE; virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; virtual void GetDocuments(const GURL& feed_url, diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc index 9f9942e..9540b0b 100644 --- a/chrome/browser/chromeos/gdata/gdata_file_system.cc +++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc @@ -19,6 +19,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/gdata/gdata.h" #include "chrome/browser/chromeos/gdata/gdata_download_observer.h" +#include "chrome/browser/chromeos/gdata/gdata_parser.h" #include "chrome/browser/download/download_service.h" #include "chrome/browser/download/download_service_factory.h" #include "chrome/browser/profiles/profile.h" @@ -1222,22 +1223,6 @@ void GDataFileSystem::OnGetAvailableSpace( feed->quota_bytes_used()); } -std::vector<GDataOperationRegistry::ProgressStatus> - GDataFileSystem::GetProgressStatusList() { - return documents_service_->operation_registry()->GetProgressStatusList(); -} - -void GDataFileSystem::AddOperationObserver( - GDataOperationRegistry::Observer* observer) { - return documents_service_->operation_registry()->AddObserver(observer); -} - -void GDataFileSystem::RemoveOperationObserver( - GDataOperationRegistry::Observer* observer) { - return documents_service_->operation_registry()->RemoveObserver(observer); -} - - void GDataFileSystem::OnCreateDirectoryCompleted( const CreateDirectoryParams& params, GDataErrorCode status, diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h index 5c6f224..8464f00 100644 --- a/chrome/browser/chromeos/gdata/gdata_file_system.h +++ b/chrome/browser/chromeos/gdata/gdata_file_system.h @@ -19,7 +19,6 @@ #include "base/platform_file.h" #include "base/synchronization/lock.h" #include "chrome/browser/chromeos/gdata/gdata_files.h" -#include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" #include "chrome/browser/chromeos/gdata/gdata_params.h" #include "chrome/browser/chromeos/gdata/gdata_parser.h" #include "chrome/browser/chromeos/gdata/gdata_uploader.h" @@ -234,13 +233,6 @@ class GDataFileSystem : public ProfileKeyedService { void GetFromCacheForPath(const FilePath& gdata_file_path, const GetFromCacheCallback& callback); - // Obtains the list of currently active operations. - std::vector<GDataOperationRegistry::ProgressStatus> GetProgressStatusList(); - // Add operation observer. - void AddOperationObserver(GDataOperationRegistry::Observer* observer); - // Remove operation observer. - void RemoveOperationObserver(GDataOperationRegistry::Observer* observer); - // Finds file object by |file_path| and returns its |file_info|. // Returns true if file was found. bool GetFileInfoFromPath(const FilePath& gdata_file_path, diff --git a/chrome/browser/chromeos/gdata/gdata_mock.h b/chrome/browser/chromeos/gdata/gdata_mock.h index bd848e0..d967c01 100644 --- a/chrome/browser/chromeos/gdata/gdata_mock.h +++ b/chrome/browser/chromeos/gdata/gdata_mock.h @@ -28,7 +28,6 @@ class MockDocumentsService : public DocumentsServiceInterface { // DocumentServiceInterface overrides. MOCK_METHOD1(Initialize, void(Profile* profile)); - MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*()); MOCK_METHOD0(CancelAll, void(void)); MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); MOCK_METHOD2(GetDocuments, void(const GURL& feed_url, diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 501fc6c..672687f 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -1337,11 +1337,6 @@ void LoginUtilsImpl::FetchCredentials(Profile* user_profile, void LoginUtilsImpl::FetchPolicyToken(Profile* offrecord_profile, const std::string& token, const std::string& secret) { - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableDevicePolicy)) { - return; - } - // Fetch dm service token now, if it hasn't been fetched yet. if (!policy_oauth_fetcher_.get() || policy_oauth_fetcher_->failed()) { // Get the default system profile to use with the policy fetching. If there diff --git a/chrome/browser/extensions/extension_event_names.cc b/chrome/browser/extensions/extension_event_names.cc index c127cd5..9f25a7a 100644 --- a/chrome/browser/extensions/extension_event_names.cc +++ b/chrome/browser/extensions/extension_event_names.cc @@ -31,8 +31,6 @@ const char kOnFileBrowserDiskChanged[] = "fileBrowserPrivate.onDiskChanged"; const char kOnFileChanged[] = "fileBrowserPrivate.onFileChanged"; const char kOnFileBrowserMountCompleted[] = "fileBrowserPrivate.onMountCompleted"; -const char kOnFileTransfersUpdated[] = - "fileBrowserPrivate.onFileTransfersUpdated"; const char kOnInputMethodChanged[] = "inputMethodPrivate.onChanged"; diff --git a/chrome/browser/extensions/extension_event_names.h b/chrome/browser/extensions/extension_event_names.h index 200328d..d18c1f11 100644 --- a/chrome/browser/extensions/extension_event_names.h +++ b/chrome/browser/extensions/extension_event_names.h @@ -38,7 +38,6 @@ extern const char kOnExtensionDisabled[]; extern const char kOnFileBrowserDiskChanged[]; extern const char kOnFileChanged[]; extern const char kOnFileBrowserMountCompleted[]; -extern const char kOnFileTransfersUpdated[]; // InputMethod. extern const char kOnInputMethodChanged[]; diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc index 892d0a1..4ee520b 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc @@ -26,7 +26,6 @@ #include "content/public/common/url_fetcher.h" #include "grit/chromium_strings.h" #include "net/base/load_flags.h" -#include "net/http/http_response_headers.h" #include "net/http/http_status_code.h" #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" @@ -689,20 +688,6 @@ void GaiaOAuthFetcher::OnURLFetchComplete(const content::URLFetcher* source) { } else { NOTREACHED(); } - - // Dump full response header for failed attempts: - if (response_code >= 400) { - if (source->GetResponseCode() == - content::URLFetcher::RESPONSE_CODE_INVALID) { - LOG(WARNING) << "Error " << response_code - << ", Response headers are malformed!!"; - } else { - std::string headers; - source->GetResponseHeaders()->GetNormalizedHeaders(&headers); - LOG(WARNING) << "Error " << response_code - << ", response header:\n" << headers; - } - } } bool GaiaOAuthFetcher::ShouldAutoFetch(AutoFetchLimit fetch_step) { diff --git a/chrome/browser/resources/file_manager/js/directory_model.js b/chrome/browser/resources/file_manager/js/directory_model.js index f7457ae..eb98100 100644 --- a/chrome/browser/resources/file_manager/js/directory_model.js +++ b/chrome/browser/resources/file_manager/js/directory_model.js @@ -763,15 +763,11 @@ DirectoryModel.prototype = { } function onGData(entry) { - console.log('onGData'); - console.log(entry); groups.gdata = [entry]; done(); } function onGDataError(error) { - console.log('onGDataError'); - console.log(error); groups.gdata = []; done(); } @@ -788,11 +784,8 @@ DirectoryModel.prototype = { }, updateRoots: function(opt_callback) { - console.log('directoryModel_.updateRoots'); var self = this; this.resolveRoots_(function(rootEntries) { - console.log('rootsList_ = '); - console.log(self.rootsList_); var dm = self.rootsList_; var args = [0, dm.length].concat(rootEntries); dm.splice.apply(dm, args); diff --git a/chrome/common/extensions/api/fileBrowserPrivate.json b/chrome/common/extensions/api/fileBrowserPrivate.json index bd8b71a..0993aed 100644 --- a/chrome/common/extensions/api/fileBrowserPrivate.json +++ b/chrome/common/extensions/api/fileBrowserPrivate.json @@ -259,37 +259,6 @@ } }, { - "id": "FileTransferStatus", - "type": "object", - "description": "Payload data for file transfer status updates.", - "properties": { - "fileUrl": { - "type": "string", - "description": "URL of file that is being transfered." - }, - "transferState": { - "type": "string", - "enum": ["started", "in_progress", "completed", "failed"], - "description": "File transfer progress state." - }, - "transferType": { - "type": "string", - "enum": ["upload", "download"], - "description": "Defines file transfer direction." - }, - "processed": { - "type": "integer", - "optional": true, - "description": "Completed portion of the transfer operation." - }, - "total": { - "type": "integer", - "optional": true, - "description": "Total size (cost) of transfer operation." - } - } - }, - { "id": "FileWatchEvent", "type": "object", "description": "Payload data for disk mount / unmount event.", @@ -683,24 +652,6 @@ ] }, { - "name": "getFileTransfers", - "description": "Get the list of ongoing file transfer operations.", - "parameters": [ - { - "name": "callback", - "type": "function", - "parameters": [ - { - "name" : "fileTransfers", - "type": "array", - "items": {"$ref": "FileTransferStatus"}, - "description": "The list of FileTransferStatus representing ongoing file transfers." - } - ] - } - ] - }, - { "name": "getSizeStats", "description": "Retrieves total and remaining size of a mount point.", "parameters": [ @@ -782,19 +733,6 @@ ] }, { - "name": "onFileTransfersUpdated", - "type": "function", - "description": "Fired when file transfers with remote file system are in progress.", - "parameters": [ - { - "type": "array", - "items": {"$ref": "FileTransferStatus"}, - "name": "event", - "description": "List of ongoing file statuses for ongoing transfer operations." - } - ] - }, - { "name": "onFileChanged", "type": "function", "description": "Fired when watched file change event is detected.", |