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

Side by Side Diff: chrome/browser/gtk/options/exceptions_page_gtk.cc

Issue 372017: Fix various problems with inline autocomplete and URLs that change length dur... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/options/exceptions_page_gtk.h" 5 #include "chrome/browser/gtk/options/exceptions_page_gtk.h"
6 6
7 #include "app/gfx/gtk_util.h" 7 #include "app/gfx/gtk_util.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "chrome/common/gtk_tree.h" 10 #include "chrome/common/gtk_tree.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 void ExceptionsPageGtk::SetExceptionList( 107 void ExceptionsPageGtk::SetExceptionList(
108 const std::vector<webkit_glue::PasswordForm*>& result) { 108 const std::vector<webkit_glue::PasswordForm*>& result) {
109 std::wstring languages = 109 std::wstring languages =
110 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); 110 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages);
111 gtk_list_store_clear(exception_list_store_); 111 gtk_list_store_clear(exception_list_store_);
112 exception_list_.resize(result.size()); 112 exception_list_.resize(result.size());
113 for (size_t i = 0; i < result.size(); ++i) { 113 for (size_t i = 0; i < result.size(); ++i) {
114 exception_list_[i] = *result[i]; 114 exception_list_[i] = *result[i];
115 std::wstring formatted = net::FormatUrl(result[i]->origin, languages, 115 std::wstring formatted = net::FormatUrl(result[i]->origin, languages,
116 false, UnescapeRule::NONE, 116 false, UnescapeRule::NONE, NULL, NULL, NULL);
117 NULL, NULL);
118 std::string site = WideToUTF8(formatted); 117 std::string site = WideToUTF8(formatted);
119 GtkTreeIter iter; 118 GtkTreeIter iter;
120 gtk_list_store_insert_with_values(exception_list_store_, &iter, (gint) i, 119 gtk_list_store_insert_with_values(exception_list_store_, &iter, (gint) i,
121 COL_SITE, site.c_str(), -1); 120 COL_SITE, site.c_str(), -1);
122 } 121 }
123 gtk_widget_set_sensitive(remove_all_button_, result.size() > 0); 122 gtk_widget_set_sensitive(remove_all_button_, result.size() > 0);
124 } 123 }
125 124
126 // static 125 // static
127 void ExceptionsPageGtk::OnRemoveButtonClicked(GtkButton* widget, 126 void ExceptionsPageGtk::OnRemoveButtonClicked(GtkButton* widget,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 PasswordStore* store = page_->GetPasswordStore(); 191 PasswordStore* store = page_->GetPasswordStore();
193 pending_login_query_ = store->GetBlacklistLogins(this); 192 pending_login_query_ = store->GetBlacklistLogins(this);
194 } 193 }
195 194
196 void ExceptionsPageGtk::ExceptionListPopulater::OnPasswordStoreRequestDone( 195 void ExceptionsPageGtk::ExceptionListPopulater::OnPasswordStoreRequestDone(
197 int handle, const std::vector<webkit_glue::PasswordForm*>& result) { 196 int handle, const std::vector<webkit_glue::PasswordForm*>& result) {
198 DCHECK_EQ(pending_login_query_, handle); 197 DCHECK_EQ(pending_login_query_, handle);
199 pending_login_query_ = 0; 198 pending_login_query_ = 0;
200 page_->SetExceptionList(result); 199 page_->SetExceptionList(result);
201 } 200 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/gtk/options/passwords_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698