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

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

Issue 7980014: Use DISABLE_RUNNABLE_METHOD_REFCOUNT macro in several places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« 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) 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/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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 method->forms_.clear(); 408 method->forms_.clear();
409 // |list| will be freed after this callback returns, so convert it now. 409 // |list| will be freed after this callback returns, so convert it now.
410 ConvertFormList(list, &method->forms_); 410 ConvertFormList(list, &method->forms_);
411 method->event_.Signal(); 411 method->event_.Signal();
412 } 412 }
413 413
414 } // namespace 414 } // namespace
415 415
416 // GKRMethod isn't reference counted, but it always outlasts runnable 416 // GKRMethod isn't reference counted, but it always outlasts runnable
417 // methods against it because the caller waits for those methods to run. 417 // methods against it because the caller waits for those methods to run.
418 template<> 418 DISABLE_RUNNABLE_METHOD_REFCOUNT(GKRMethod);
419 struct RunnableMethodTraits<GKRMethod> {
420 void RetainCallee(GKRMethod*) {}
421 void ReleaseCallee(GKRMethod*) {}
422 };
423 419
424 NativeBackendGnome::NativeBackendGnome(LocalProfileId id, PrefService* prefs) 420 NativeBackendGnome::NativeBackendGnome(LocalProfileId id, PrefService* prefs)
425 : profile_id_(id), prefs_(prefs) { 421 : profile_id_(id), prefs_(prefs) {
426 if (PasswordStoreX::PasswordsUseLocalProfileId(prefs)) { 422 if (PasswordStoreX::PasswordsUseLocalProfileId(prefs)) {
427 app_string_ = GetProfileSpecificAppString(); 423 app_string_ = GetProfileSpecificAppString();
428 // We already did the migration previously. Don't try again. 424 // We already did the migration previously. Don't try again.
429 migrate_tried_ = true; 425 migrate_tried_ = true;
430 } else { 426 } else {
431 app_string_ = kGnomeKeyringAppString; 427 app_string_ = kGnomeKeyringAppString;
432 migrate_tried_ = false; 428 migrate_tried_ = false;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // Each other profile must be able to migrate the shared data as well, 730 // Each other profile must be able to migrate the shared data as well,
735 // so we must leave it alone. After a few releases, we'll add code to 731 // so we must leave it alone. After a few releases, we'll add code to
736 // delete them, and eventually remove this migration code. 732 // delete them, and eventually remove this migration code.
737 // TODO(mdm): follow through with the plan above. 733 // TODO(mdm): follow through with the plan above.
738 PasswordStoreX::SetPasswordsUseLocalProfileId(prefs_); 734 PasswordStoreX::SetPasswordsUseLocalProfileId(prefs_);
739 } else { 735 } else {
740 // We failed to migrate for some reason. Use the old app string. 736 // We failed to migrate for some reason. Use the old app string.
741 app_string_ = kGnomeKeyringAppString; 737 app_string_ = kGnomeKeyringAppString;
742 } 738 }
743 } 739 }
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