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

Side by Side Diff: chrome/browser/password_manager/native_backend_gnome_x.cc

Issue 536783002: [Password Manager] Remove action match requirement for RemoveLogin() on Gnome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/native_backend_gnome_x_unittest.cc » ('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) 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/password_manager/native_backend_gnome_x.h" 5 #include "chrome/browser/password_manager/native_backend_gnome_x.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gnome-keyring.h> 8 #include <gnome-keyring.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 void GKRMethod::RemoveLogin(const PasswordForm& form, const char* app_string) { 398 void GKRMethod::RemoveLogin(const PasswordForm& form, const char* app_string) {
399 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 399 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
400 // We find forms using the same fields as LoginDatabase::RemoveLogin(). 400 // We find forms using the same fields as LoginDatabase::RemoveLogin().
401 gnome_keyring_delete_password( 401 gnome_keyring_delete_password(
402 &kGnomeSchema, 402 &kGnomeSchema,
403 OnOperationDone, 403 OnOperationDone,
404 this, // data 404 this, // data
405 NULL, // destroy_data 405 NULL, // destroy_data
406 "origin_url", form.origin.spec().c_str(), 406 "origin_url", form.origin.spec().c_str(),
407 "action_url", form.action.spec().c_str(),
408 "username_element", UTF16ToUTF8(form.username_element).c_str(), 407 "username_element", UTF16ToUTF8(form.username_element).c_str(),
409 "username_value", UTF16ToUTF8(form.username_value).c_str(), 408 "username_value", UTF16ToUTF8(form.username_value).c_str(),
410 "password_element", UTF16ToUTF8(form.password_element).c_str(), 409 "password_element", UTF16ToUTF8(form.password_element).c_str(),
411 "submit_element", UTF16ToUTF8(form.submit_element).c_str(), 410 "submit_element", UTF16ToUTF8(form.submit_element).c_str(),
412 "signon_realm", form.signon_realm.c_str(), 411 "signon_realm", form.signon_realm.c_str(),
413 "application", app_string, 412 "application", app_string,
414 NULL); 413 NULL);
415 } 414 }
416 415
417 void GKRMethod::GetLogins(const PasswordForm& form, const char* app_string) { 416 void GKRMethod::GetLogins(const PasswordForm& form, const char* app_string) {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 786 }
788 return ok; 787 return ok;
789 } 788 }
790 789
791 std::string NativeBackendGnome::GetProfileSpecificAppString() const { 790 std::string NativeBackendGnome::GetProfileSpecificAppString() const {
792 // Originally, the application string was always just "chrome" and used only 791 // Originally, the application string was always just "chrome" and used only
793 // so that we had *something* to search for since GNOME Keyring won't search 792 // so that we had *something* to search for since GNOME Keyring won't search
794 // for nothing. Now we use it to distinguish passwords for different profiles. 793 // for nothing. Now we use it to distinguish passwords for different profiles.
795 return base::StringPrintf("%s-%d", kGnomeKeyringAppString, profile_id_); 794 return base::StringPrintf("%s-%d", kGnomeKeyringAppString, profile_id_);
796 } 795 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/native_backend_gnome_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698