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

Side by Side Diff: chrome/browser/dom_ui/options/cookies_view_handler.cc

Issue 4682002: Remove "name" field from indexed databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 | « chrome/browser/cookies_tree_model.cc ('k') | chrome/browser/gtk/gtk_chrome_cookie_view.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/options/cookies_view_handler.h" 5 #include "chrome/browser/dom_ui/options/cookies_view_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 break; 151 break;
152 } 152 }
153 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: { 153 case CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB: {
154 dict->SetString(kKeyType, "indexed_db"); 154 dict->SetString(kKeyType, "indexed_db");
155 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON"); 155 dict->SetString(kKeyIcon, "chrome://theme/IDR_COOKIE_STORAGE_ICON");
156 156
157 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info = 157 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info =
158 *node.GetDetailedInfo().indexed_db_info; 158 *node.GetDetailedInfo().indexed_db_info;
159 159
160 dict->SetString(kKeyName, indexed_db_info.database_name.empty() ?
161 l10n_util::GetStringUTF8(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) :
162 indexed_db_info.database_name);
163 dict->SetString(kKeyOrigin, indexed_db_info.origin); 160 dict->SetString(kKeyOrigin, indexed_db_info.origin);
164 dict->SetString(kKeySize, 161 dict->SetString(kKeySize,
165 FormatBytes(indexed_db_info.size, 162 FormatBytes(indexed_db_info.size,
166 GetByteDisplayUnits(indexed_db_info.size), 163 GetByteDisplayUnits(indexed_db_info.size),
167 true)); 164 true));
168 dict->SetString(kKeyModified, WideToUTF8( 165 dict->SetString(kKeyModified, WideToUTF8(
169 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified))); 166 base::TimeFormatFriendlyDateAndTime(indexed_db_info.last_modified)));
170 167
171 break; 168 break;
172 } 169 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 localized_strings->SetString("label_cookie_expires", 224 localized_strings->SetString("label_cookie_expires",
228 l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_EXPIRES_LABEL)); 225 l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_EXPIRES_LABEL));
229 localized_strings->SetString("label_webdb_desc", 226 localized_strings->SetString("label_webdb_desc",
230 l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL)); 227 l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL));
231 localized_strings->SetString("label_local_storage_size", 228 localized_strings->SetString("label_local_storage_size",
232 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)); 229 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL));
233 localized_strings->SetString("label_local_storage_last_modified", 230 localized_strings->SetString("label_local_storage_last_modified",
234 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)); 231 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL));
235 localized_strings->SetString("label_local_storage_origin", 232 localized_strings->SetString("label_local_storage_origin",
236 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL)); 233 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL));
237 localized_strings->SetString("label_indexed_db_name",
238 l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NAME_LABEL));
239 localized_strings->SetString("label_indexed_db_size", 234 localized_strings->SetString("label_indexed_db_size",
240 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)); 235 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL));
241 localized_strings->SetString("label_indexed_db_last_modified", 236 localized_strings->SetString("label_indexed_db_last_modified",
242 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)); 237 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL));
243 localized_strings->SetString("label_indexed_db_origin", 238 localized_strings->SetString("label_indexed_db_origin",
244 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL)); 239 l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL));
245 localized_strings->SetString("label_app_cache_manifest", 240 localized_strings->SetString("label_app_cache_manifest",
246 l10n_util::GetStringUTF16(IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL)); 241 l10n_util::GetStringUTF16(IDS_COOKIES_APPLICATION_CACHE_MANIFEST_LABEL));
247 localized_strings->SetString("label_cookie_last_accessed", 242 localized_strings->SetString("label_cookie_last_accessed",
248 l10n_util::GetStringUTF16(IDS_COOKIES_LAST_ACCESSED_LABEL)); 243 l10n_util::GetStringUTF16(IDS_COOKIES_LAST_ACCESSED_LABEL));
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 GetChildNodeList(parent, 0, parent->GetChildCount(), children); 391 GetChildNodeList(parent, 0, parent->GetChildCount(), children);
397 392
398 ListValue args; 393 ListValue args;
399 args.Append(parent == cookies_tree_model_->GetRoot() ? 394 args.Append(parent == cookies_tree_model_->GetRoot() ?
400 Value::CreateNullValue() : 395 Value::CreateNullValue() :
401 Value::CreateStringValue(PointerToHexString(parent))); 396 Value::CreateStringValue(PointerToHexString(parent)));
402 args.Append(children); 397 args.Append(children);
403 398
404 dom_ui_->CallJavascriptFunction(L"CookiesView.loadChildren", args); 399 dom_ui_->CallJavascriptFunction(L"CookiesView.loadChildren", args);
405 } 400 }
OLDNEW
« no previous file with comments | « chrome/browser/cookies_tree_model.cc ('k') | chrome/browser/gtk/gtk_chrome_cookie_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698