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

Side by Side Diff: chrome/browser/chromeos/drive/drive_app_registry.h

Issue 23503008: file_manager: Add DriveAppRegistry::UpdateFromAppList() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_app_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ~DriveAppRegistry(); 66 ~DriveAppRegistry();
67 67
68 // Returns a list of web app information for the |file| with |mime_type|. 68 // Returns a list of web app information for the |file| with |mime_type|.
69 void GetAppsForFile(const base::FilePath& file_path, 69 void GetAppsForFile(const base::FilePath& file_path,
70 const std::string& mime_type, 70 const std::string& mime_type,
71 ScopedVector<DriveAppInfo>* apps) const; 71 ScopedVector<DriveAppInfo>* apps) const;
72 72
73 // Updates this registry by fetching the data from the server. 73 // Updates this registry by fetching the data from the server.
74 void Update(); 74 void Update();
75 75
76 // Updates this registry from the |app_list|.
77 void UpdateFromAppList(const google_apis::AppList& app_list);
78
76 private: 79 private:
77 // Defines application details that are associated with a given 80 // Defines application details that are associated with a given
78 // file extension or content mimetype. 81 // file extension or content mimetype.
79 struct DriveAppFileSelector { 82 struct DriveAppFileSelector {
80 DriveAppFileSelector( 83 DriveAppFileSelector(
81 const GURL& product_link, 84 const GURL& product_link,
82 const google_apis::InstalledApp::IconList& app_icons, 85 const google_apis::InstalledApp::IconList& app_icons,
83 const google_apis::InstalledApp::IconList& document_icons, 86 const google_apis::InstalledApp::IconList& document_icons,
84 const std::string& object_type, 87 const std::string& object_type,
85 const std::string& app_id, 88 const std::string& app_id,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Icons do not have to be sorted by the icon size. If there are no icons in 167 // Icons do not have to be sorted by the icon size. If there are no icons in
165 // the list, returns an empty URL. 168 // the list, returns an empty URL.
166 GURL FindPreferredIcon(const google_apis::InstalledApp::IconList& icons, 169 GURL FindPreferredIcon(const google_apis::InstalledApp::IconList& icons,
167 int preferred_size); 170 int preferred_size);
168 171
169 } // namespace util 172 } // namespace util
170 173
171 } // namespace drive 174 } // namespace drive
172 175
173 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_ 176 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_APP_REGISTRY_H_
OLDNEW
« 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