OLD | NEW |
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 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" | 5 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return extensions; | 126 return extensions; |
127 } | 127 } |
128 | 128 |
129 void DriveWebAppsRegistry::UpdateFromFeed(AccountMetadataFeed* metadata) { | 129 void DriveWebAppsRegistry::UpdateFromFeed(AccountMetadataFeed* metadata) { |
130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
131 | 131 |
132 url_to_name_map_.clear(); | 132 url_to_name_map_.clear(); |
133 STLDeleteValues(&webapp_extension_map_); | 133 STLDeleteValues(&webapp_extension_map_); |
134 STLDeleteValues(&webapp_mimetypes_map_); | 134 STLDeleteValues(&webapp_mimetypes_map_); |
135 for (ScopedVector<InstalledApp>::const_iterator it = | 135 for (ScopedVector<InstalledApp>::const_iterator it = |
136 metadata->installed_apps()->begin(); | 136 metadata->installed_apps().begin(); |
137 it != metadata->installed_apps()->end(); ++it) { | 137 it != metadata->installed_apps().end(); ++it) { |
138 const InstalledApp* app = *it; | 138 const InstalledApp* app = *it; |
139 GURL product_url = app->GetProductUrl(); | 139 GURL product_url = app->GetProductUrl(); |
140 if (product_url.is_empty()) | 140 if (product_url.is_empty()) |
141 continue; | 141 continue; |
142 | 142 |
143 InstalledApp::IconList app_icons = | 143 InstalledApp::IconList app_icons = |
144 app->GetIconsForCategory(AppIcon::APPLICATION); | 144 app->GetIconsForCategory(AppIcon::APPLICATION); |
145 InstalledApp::IconList document_icons = | 145 InstalledApp::IconList document_icons = |
146 app->GetIconsForCategory(AppIcon::DOCUMENT); | 146 app->GetIconsForCategory(AppIcon::DOCUMENT); |
147 | 147 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 web_app->app_icons, | 232 web_app->app_icons, |
233 web_app->document_icons, | 233 web_app->document_icons, |
234 web_store_id, | 234 web_store_id, |
235 product_iter->second, // app name. | 235 product_iter->second, // app name. |
236 web_app->object_type, | 236 web_app->object_type, |
237 web_app->is_primary_selector))); | 237 web_app->is_primary_selector))); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 } // namespace gdata | 241 } // namespace gdata |
OLD | NEW |