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

Side by Side Diff: chrome/browser/ui/gtk/gtk_chrome_cookie_view.cc

Issue 13954002: Refactor IndexedDBInfo out of browsingdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cocoa unit tests Created 7 years, 8 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
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 #include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h" 5 #include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "content/public/browser/indexed_db_context.h"
9 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
10 #include "net/cookies/canonical_cookie.h" 11 #include "net/cookies/canonical_cookie.h"
11 #include "net/cookies/parsed_cookie.h" 12 #include "net/cookies/parsed_cookie.h"
12 #include "ui/base/gtk/gtk_hig_constants.h" 13 #include "ui/base/gtk/gtk_hig_constants.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/base/text/bytes_formatting.h" 15 #include "ui/base/text/bytes_formatting.h"
15 16
16 namespace { 17 namespace {
17 18
18 void InitBrowserDetailStyle(GtkWidget* entry, GtkStyle* label_style, 19 void InitBrowserDetailStyle(GtkWidget* entry, GtkStyle* label_style,
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 info.creation_time)).c_str()); 584 info.creation_time)).c_str());
584 gtk_entry_set_text(GTK_ENTRY(self->appcache_last_accessed_entry_), 585 gtk_entry_set_text(GTK_ENTRY(self->appcache_last_accessed_entry_),
585 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( 586 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(
586 info.last_access_time)).c_str()); 587 info.last_access_time)).c_str());
587 SetAppCacheDetailsSensitivity(self, TRUE); 588 SetAppCacheDetailsSensitivity(self, TRUE);
588 } 589 }
589 590
590 // Switches the display to showing the passed in IndexedDB data. 591 // Switches the display to showing the passed in IndexedDB data.
591 void gtk_chrome_cookie_view_display_indexed_db( 592 void gtk_chrome_cookie_view_display_indexed_db(
592 GtkChromeCookieView* self, 593 GtkChromeCookieView* self,
593 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info) { 594 const content::IndexedDBInfo& indexed_db_info) {
594 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); 595 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_);
595 596
596 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), 597 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_),
597 indexed_db_info.origin.spec().c_str()); 598 indexed_db_info.origin.spec().c_str());
598 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), 599 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_),
599 UTF16ToUTF8(ui::FormatBytes( 600 UTF16ToUTF8(ui::FormatBytes(
600 indexed_db_info.size)).c_str()); 601 indexed_db_info.size)).c_str());
601 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_last_modified_entry_), 602 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_last_modified_entry_),
602 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( 603 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(
603 indexed_db_info.last_modified)).c_str()); 604 indexed_db_info.last_modified)).c_str());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 int store_size = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); 657 int store_size = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL);
657 if (store_size == 1) 658 if (store_size == 1)
658 return false; 659 return false;
659 660
660 DCHECK_EQ(2, store_size); 661 DCHECK_EQ(2, store_size);
661 662
662 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX( 663 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX(
663 self->cookie_expires_combobox_)); 664 self->cookie_expires_combobox_));
664 return selected == 1; 665 return selected == 1;
665 } 666 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_chrome_cookie_view.h ('k') | chrome/browser/ui/webui/cookies_tree_model_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698