| 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/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 "content/public/browser/indexed_db_context.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 SetAppCacheDetailsSensitivity(self, TRUE); | 588 SetAppCacheDetailsSensitivity(self, TRUE); |
| 589 } | 589 } |
| 590 | 590 |
| 591 // Switches the display to showing the passed in IndexedDB data. | 591 // Switches the display to showing the passed in IndexedDB data. |
| 592 void gtk_chrome_cookie_view_display_indexed_db( | 592 void gtk_chrome_cookie_view_display_indexed_db( |
| 593 GtkChromeCookieView* self, | 593 GtkChromeCookieView* self, |
| 594 const content::IndexedDBInfo& indexed_db_info) { | 594 const content::IndexedDBInfo& indexed_db_info) { |
| 595 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); | 595 UpdateVisibleDetailedInfo(self, self->indexed_db_details_table_); |
| 596 | 596 |
| 597 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), | 597 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_origin_entry_), |
| 598 indexed_db_info.origin.spec().c_str()); | 598 indexed_db_info.origin_.spec().c_str()); |
| 599 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), | 599 gtk_entry_set_text(GTK_ENTRY(self->indexed_db_size_entry_), |
| 600 UTF16ToUTF8(ui::FormatBytes( | 600 UTF16ToUTF8(ui::FormatBytes( |
| 601 indexed_db_info.size)).c_str()); | 601 indexed_db_info.size_)).c_str()); |
| 602 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_), |
| 603 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( | 603 UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime( |
| 604 indexed_db_info.last_modified)).c_str()); | 604 indexed_db_info.last_modified_)).c_str()); |
| 605 SetLocalStorageDetailsSensitivity(self, TRUE); | 605 SetLocalStorageDetailsSensitivity(self, TRUE); |
| 606 } | 606 } |
| 607 | 607 |
| 608 void gtk_chrome_cookie_view_display_local_storage_item( | 608 void gtk_chrome_cookie_view_display_local_storage_item( |
| 609 GtkChromeCookieView* self, | 609 GtkChromeCookieView* self, |
| 610 const std::string& host, | 610 const std::string& host, |
| 611 const string16& key, | 611 const string16& key, |
| 612 const string16& value) { | 612 const string16& value) { |
| 613 UpdateVisibleDetailedInfo(self, self->local_storage_item_table_); | 613 UpdateVisibleDetailedInfo(self, self->local_storage_item_table_); |
| 614 | 614 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 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); |
| 658 if (store_size == 1) | 658 if (store_size == 1) |
| 659 return false; | 659 return false; |
| 660 | 660 |
| 661 DCHECK_EQ(2, store_size); | 661 DCHECK_EQ(2, store_size); |
| 662 | 662 |
| 663 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX( | 663 int selected = gtk_combo_box_get_active(GTK_COMBO_BOX( |
| 664 self->cookie_expires_combobox_)); | 664 self->cookie_expires_combobox_)); |
| 665 return selected == 1; | 665 return selected == 1; |
| 666 } | 666 } |
| OLD | NEW |