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

Unified Diff: chrome/browser/chromeos/drive/drive_webapps_registry.cc

Issue 11106007: drive: Rename 'gdata' namespace to 'drive' in chrome/browser/chromeos/drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
Index: chrome/browser/chromeos/drive/drive_webapps_registry.cc
diff --git a/chrome/browser/chromeos/drive/drive_webapps_registry.cc b/chrome/browser/chromeos/drive/drive_webapps_registry.cc
index 5436d312cddb5090a4c5cfe2a6312b0148ab46cf..2ba81add9e6e2603310ad4efeceb761cd90d5eb1 100644
--- a/chrome/browser/chromeos/drive/drive_webapps_registry.cc
+++ b/chrome/browser/chromeos/drive/drive_webapps_registry.cc
@@ -16,7 +16,7 @@
using content::BrowserThread;
-namespace gdata {
+namespace drive {
namespace {
@@ -40,8 +40,8 @@ std::string GetWebStoreIdFromUrl(const GURL& url) {
}
// TODO(kochi): This is duplicate from gdata_wapi_parser.cc.
-bool SortBySize(const InstalledApp::IconList::value_type& a,
- const InstalledApp::IconList::value_type& b) {
+bool SortBySize(const gdata::InstalledApp::IconList::value_type& a,
+ const gdata::InstalledApp::IconList::value_type& b) {
return a.first < b.first;
}
@@ -49,13 +49,14 @@ bool SortBySize(const InstalledApp::IconList::value_type& a,
// DriveWebAppInfo struct implementation.
-DriveWebAppInfo::DriveWebAppInfo(const std::string& app_id,
- const InstalledApp::IconList& app_icons,
- const InstalledApp::IconList& document_icons,
- const std::string& web_store_id,
- const string16& app_name,
- const string16& object_type,
- bool is_primary_selector)
+DriveWebAppInfo::DriveWebAppInfo(
+ const std::string& app_id,
+ const gdata::InstalledApp::IconList& app_icons,
+ const gdata::InstalledApp::IconList& document_icons,
+ const std::string& web_store_id,
+ const string16& app_name,
+ const string16& object_type,
+ bool is_primary_selector)
: app_id(app_id),
app_icons(app_icons),
document_icons(document_icons),
@@ -72,8 +73,8 @@ DriveWebAppInfo::~DriveWebAppInfo() {
DriveWebAppsRegistry::WebAppFileSelector::WebAppFileSelector(
const GURL& product_link,
- const InstalledApp::IconList& app_icons,
- const InstalledApp::IconList& document_icons,
+ const gdata::InstalledApp::IconList& app_icons,
+ const gdata::InstalledApp::IconList& document_icons,
const string16& object_type,
const std::string& app_id,
bool is_primary_selector)
@@ -144,24 +145,24 @@ std::set<std::string> DriveWebAppsRegistry::GetExtensionsForWebStoreApp(
}
void DriveWebAppsRegistry::UpdateFromFeed(
- const AccountMetadataFeed& metadata) {
+ const gdata::AccountMetadataFeed& metadata) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
url_to_name_map_.clear();
STLDeleteValues(&webapp_extension_map_);
STLDeleteValues(&webapp_mimetypes_map_);
- for (ScopedVector<InstalledApp>::const_iterator it =
+ for (ScopedVector<gdata::InstalledApp>::const_iterator it =
metadata.installed_apps().begin();
it != metadata.installed_apps().end(); ++it) {
- const InstalledApp& app = **it;
+ const gdata::InstalledApp& app = **it;
GURL product_url = app.GetProductUrl();
if (product_url.is_empty())
continue;
- InstalledApp::IconList app_icons =
- app.GetIconsForCategory(AppIcon::ICON_APPLICATION);
- InstalledApp::IconList document_icons =
- app.GetIconsForCategory(AppIcon::ICON_DOCUMENT);
+ gdata::InstalledApp::IconList app_icons =
+ app.GetIconsForCategory(gdata::AppIcon::ICON_APPLICATION);
+ gdata::InstalledApp::IconList document_icons =
+ app.GetIconsForCategory(gdata::AppIcon::ICON_DOCUMENT);
if (VLOG_IS_ON(1)) {
std::vector<std::string> mime_types;
@@ -219,27 +220,28 @@ void DriveWebAppsRegistry::UpdateFromFeed(
}
}
-void DriveWebAppsRegistry::UpdateFromApplicationList(const AppList& applist) {
+void DriveWebAppsRegistry::UpdateFromApplicationList(
+ const gdata::AppList& applist) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
url_to_name_map_.clear();
STLDeleteValues(&webapp_extension_map_);
STLDeleteValues(&webapp_mimetypes_map_);
for (size_t i = 0; i < applist.items().size(); ++i) {
- const AppResource& app = *applist.items()[i];
+ const gdata::AppResource& app = *applist.items()[i];
if (app.product_url().is_empty())
continue;
- InstalledApp::IconList app_icons;
- InstalledApp::IconList document_icons;
+ gdata::InstalledApp::IconList app_icons;
+ gdata::InstalledApp::IconList document_icons;
for (size_t j = 0; j < app.icons().size(); ++j) {
- const DriveAppIcon& icon = *app.icons()[j];
+ const gdata::DriveAppIcon& icon = *app.icons()[j];
if (icon.icon_url().is_empty())
continue;
- if (icon.category() == DriveAppIcon::APPLICATION)
+ if (icon.category() == gdata::DriveAppIcon::APPLICATION)
app_icons.push_back(std::make_pair(icon.icon_side_length(),
icon.icon_url()));
- if (icon.category() == DriveAppIcon::DOCUMENT)
+ if (icon.category() == gdata::DriveAppIcon::DOCUMENT)
document_icons.push_back(std::make_pair(icon.icon_side_length(),
icon.icon_url()));
}
@@ -286,8 +288,8 @@ void DriveWebAppsRegistry::UpdateFromApplicationList(const AppList& applist) {
// static.
void DriveWebAppsRegistry::AddAppSelectorList(
const GURL& product_link,
- const InstalledApp::IconList& app_icons,
- const InstalledApp::IconList& document_icons,
+ const gdata::InstalledApp::IconList& app_icons,
+ const gdata::InstalledApp::IconList& document_icons,
const string16& object_type,
const std::string& app_id,
bool is_primary_selector,
@@ -339,4 +341,4 @@ void DriveWebAppsRegistry::FindWebAppsForSelector(
}
}
-} // namespace gdata
+} // namespace drive

Powered by Google App Engine
This is Rietveld 408576698