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

Unified Diff: chrome/browser/drive/drive_app_registry.cc

Issue 134213003: Revert of Implement DriveAppRegistry::UninstallApp() and GetAppList(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « chrome/browser/drive/drive_app_registry.h ('k') | chrome/browser/drive/drive_app_registry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_app_registry.cc
diff --git a/chrome/browser/drive/drive_app_registry.cc b/chrome/browser/drive/drive_app_registry.cc
index ace9187fe15abb5f172b7b9471dfbb30fcc9e5cb..2c8661e7db96c6f29a2e926604b8179455331ec7 100644
--- a/chrome/browser/drive/drive_app_registry.cc
+++ b/chrome/browser/drive/drive_app_registry.cc
@@ -33,16 +33,6 @@
std::pair<iterator, iterator> range = map.equal_range(selector);
for (iterator it = range.first; it != range.second; ++it)
matched_apps->push_back(it->second);
-}
-
-void RemoveAppFromSelector(const std::string& app_id,
- std::multimap<std::string, std::string>* map) {
- typedef std::multimap<std::string, std::string>::iterator iterator;
- for (iterator it = map->begin(); it != map->end(); ) {
- iterator now = it++;
- if (now->second == app_id)
- map->erase(now);
- }
}
} // namespace
@@ -102,16 +92,6 @@
DCHECK(it != all_apps_.end());
apps->push_back(it->second);
}
- }
-}
-
-void DriveAppRegistry::GetAppList(std::vector<DriveAppInfo>* apps) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- apps->clear();
- for (std::map<std::string, DriveAppInfo>::const_iterator
- it = all_apps_.begin(); it != all_apps_.end(); ++it) {
- apps->push_back(it->second);
}
}
@@ -180,37 +160,6 @@
}
}
-void DriveAppRegistry::UninstallApp(const std::string& app_id,
- const UninstallCallback& callback) {
- DCHECK(!callback.is_null());
-
- drive_service_->UninstallApp(app_id,
- base::Bind(&DriveAppRegistry::OnAppUninstalled,
- weak_ptr_factory_.GetWeakPtr(),
- app_id,
- callback));
-}
-
-void DriveAppRegistry::OnAppUninstalled(const std::string& app_id,
- const UninstallCallback& callback,
- google_apis::GDataErrorCode error) {
- if (error == google_apis::HTTP_SUCCESS) {
- all_apps_.erase(app_id);
- RemoveAppFromSelector(app_id, &mimetype_map_);
- RemoveAppFromSelector(app_id, &extension_map_);
- }
- callback.Run(error);
-}
-
-// static
-bool DriveAppRegistry::IsAppUninstallSupported() {
-#ifdef USE_OFFICIAL_GOOGLE_API_KEYS
- return true;
-#else
- return false;
-#endif
-}
-
namespace util {
GURL FindPreferredIcon(const google_apis::InstalledApp::IconList& icons,
« no previous file with comments | « chrome/browser/drive/drive_app_registry.h ('k') | chrome/browser/drive/drive_app_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698