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

Unified Diff: chrome/browser/chromeos/drive/drive_app_registry.h

Issue 125813002: Clean up DriveAppRegistry (part 2 of 2). (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 | « no previous file | chrome/browser/chromeos/drive/drive_app_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_app_registry.h
diff --git a/chrome/browser/chromeos/drive/drive_app_registry.h b/chrome/browser/chromeos/drive/drive_app_registry.h
index 52efd41a638d55459d667a00063b405fbc40faef..55ea3079b1384e67d3d485f50e167ef86a9c2dcc 100644
--- a/chrome/browser/chromeos/drive/drive_app_registry.h
+++ b/chrome/browser/chromeos/drive/drive_app_registry.h
@@ -70,39 +70,21 @@ class DriveAppRegistry {
void UpdateFromAppList(const google_apis::AppList& app_list);
private:
-
- // Defines mapping between file content type selectors (extensions, MIME
- // types) and corresponding app.
- typedef std::multimap<std::string, DriveAppInfo*> DriveAppFileSelectorMap;
-
// Part of Update(). Runs upon the completion of fetching the Drive apps
// data from the server.
void UpdateAfterGetAppList(google_apis::GDataErrorCode gdata_error,
scoped_ptr<google_apis::AppList> app_list);
- // Helper function for loading Drive application file |selectors| into
- // corresponding |map|.
- static void AddAppSelectorList(
- const std::string& app_name,
- const google_apis::InstalledApp::IconList& app_icons,
- const google_apis::InstalledApp::IconList& document_icons,
- const std::string& app_id,
- const GURL& create_url,
- const ScopedVector<std::string>& selectors,
- DriveAppFileSelectorMap* map);
-
- // Finds matching |apps| from |map| based on provided file |selector|.
- void FindAppsForSelector(const std::string& selector,
- const DriveAppFileSelectorMap& map,
- std::vector<DriveAppInfo*>* matched_apps) const;
+ // Map of application id to each app's info.
+ std::map<std::string, DriveAppInfo> all_apps_;
- JobScheduler* scheduler_;
-
- // Map of filename extension to application info.
- DriveAppFileSelectorMap app_extension_map_;
+ // Defines mapping between file content type selectors (extensions, MIME
+ // types) and corresponding app.
+ typedef std::multimap<std::string, std::string> DriveAppFileSelectorMap;
+ DriveAppFileSelectorMap extension_map_;
+ DriveAppFileSelectorMap mimetype_map_;
- // Map of MIME type to application info.
- DriveAppFileSelectorMap app_mimetypes_map_;
+ JobScheduler* scheduler_;
bool is_updating_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_app_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698