| 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/password_manager/native_backend_kwallet_x.h" | 5 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 const char NativeBackendKWallet::kKLauncherServiceName[] = "org.kde.klauncher"; | 32 const char NativeBackendKWallet::kKLauncherServiceName[] = "org.kde.klauncher"; |
| 33 const char NativeBackendKWallet::kKLauncherPath[] = "/KLauncher"; | 33 const char NativeBackendKWallet::kKLauncherPath[] = "/KLauncher"; |
| 34 const char NativeBackendKWallet::kKLauncherInterface[] = "org.kde.KLauncher"; | 34 const char NativeBackendKWallet::kKLauncherInterface[] = "org.kde.KLauncher"; |
| 35 | 35 |
| 36 NativeBackendKWallet::NativeBackendKWallet(LocalProfileId id, | 36 NativeBackendKWallet::NativeBackendKWallet(LocalProfileId id, |
| 37 PrefService* prefs) | 37 PrefService* prefs) |
| 38 : profile_id_(id), | 38 : profile_id_(id), |
| 39 prefs_(prefs), | 39 prefs_(prefs), |
| 40 kwallet_proxy_(NULL), | 40 kwallet_proxy_(NULL), |
| 41 app_name_(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME)) { | 41 app_name_(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME)) { |
| 42 if (PasswordStoreX::PasswordsUseLocalProfileId(prefs)) { | 42 // TODO(mdm): after a few more releases, remove the code which is now dead due |
| 43 // to the true || here, and simplify this code. We don't do it yet to make it |
| 44 // easier to revert if necessary. |
| 45 if (true || PasswordStoreX::PasswordsUseLocalProfileId(prefs)) { |
| 43 folder_name_ = GetProfileSpecificFolderName(); | 46 folder_name_ = GetProfileSpecificFolderName(); |
| 44 // We already did the migration previously. Don't try again. | 47 // We already did the migration previously. Don't try again. |
| 45 migrate_tried_ = true; | 48 migrate_tried_ = true; |
| 46 } else { | 49 } else { |
| 47 folder_name_ = kKWalletFolder; | 50 folder_name_ = kKWalletFolder; |
| 48 migrate_tried_ = false; | 51 migrate_tried_ = false; |
| 49 } | 52 } |
| 50 } | 53 } |
| 51 | 54 |
| 52 NativeBackendKWallet::~NativeBackendKWallet() { | 55 NativeBackendKWallet::~NativeBackendKWallet() { |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 // Each other profile must be able to migrate the shared data as well, | 890 // Each other profile must be able to migrate the shared data as well, |
| 888 // so we must leave it alone. After a few releases, we'll add code to | 891 // so we must leave it alone. After a few releases, we'll add code to |
| 889 // delete them, and eventually remove this migration code. | 892 // delete them, and eventually remove this migration code. |
| 890 // TODO(mdm): follow through with the plan above. | 893 // TODO(mdm): follow through with the plan above. |
| 891 PasswordStoreX::SetPasswordsUseLocalProfileId(prefs_); | 894 PasswordStoreX::SetPasswordsUseLocalProfileId(prefs_); |
| 892 } else { | 895 } else { |
| 893 // We failed to migrate for some reason. Use the old folder name. | 896 // We failed to migrate for some reason. Use the old folder name. |
| 894 folder_name_ = kKWalletFolder; | 897 folder_name_ = kKWalletFolder; |
| 895 } | 898 } |
| 896 } | 899 } |
| OLD | NEW |