OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/gtk/gtk_util.h" | 9 #include "chrome/browser/ui/gtk/gtk_util.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 SetAppCacheDetailsSensitivity(self, TRUE); | 585 SetAppCacheDetailsSensitivity(self, TRUE); |
586 } | 586 } |
587 | 587 |
588 // Switches the display to showing the passed in IndexedDB data. | 588 // Switches the display to showing the passed in IndexedDB data. |
589 void gtk_chrome_cookie_view_display_indexed_db( | 589 void gtk_chrome_cookie_view_display_indexed_db( |
590 GtkChromeCookieView* self, | 590 GtkChromeCookieView* self, |
591 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info) { | 591 const BrowsingDataIndexedDBHelper::IndexedDBInfo& indexed_db_info) { |
592 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); | 592 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); |
593 | 593 |
594 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), | 594 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), |
595 indexed_db_info.origin.c_str()); | 595 indexed_db_info.origin.spec().c_str()); |
596 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), | 596 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), |
597 UTF16ToUTF8(ui::FormatBytes( | 597 UTF16ToUTF8(ui::FormatBytes( |
598 indexed_db_info.size)).c_str()); | 598 indexed_db_info.size)).c_str()); |
599 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_last_modified_entry_), | 599 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_last_modified_entry_), |
600 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( | 600 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( |
601 indexed_db_info.last_modified)).c_str()); | 601 indexed_db_info.last_modified)).c_str()); |
602 SetLocalStorageDetailsSensitivity(self, TRUE); | 602 SetLocalStorageDetailsSensitivity(self, TRUE); |
603 } | 603 } |
604 | 604 |
605 void gtk_chrome_cookie_view_display_local_storage_item( | 605 void gtk_chrome_cookie_view_display_local_storage_item( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 int store_size = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); | 654 int store_size = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), NULL); |
655 if (store_size == 1) | 655 if (store_size == 1) |
656 return false; | 656 return false; |
657 | 657 |
658 DCHECK_EQ(2, store_size); | 658 DCHECK_EQ(2, store_size); |
659 | 659 |
660 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX( | 660 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX( |
661 self->cookie_expires_combobox_)); | 661 self->cookie_expires_combobox_)); |
662 return selected == 1; | 662 return selected == 1; |
663 } | 663 } |
OLD | NEW |