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/password_manager/password_store_x.h" | 5 #include "chrome/browser/password_manager/password_store_x.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "chrome/browser/password_manager/password_store_change.h" | 14 #include "chrome/browser/password_manager/password_store_change.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 using std::vector; | 22 using std::vector; |
23 using webkit::forms::PasswordForm; | 23 using content::PasswordForm; |
24 | 24 |
25 PasswordStoreX::PasswordStoreX(LoginDatabase* login_db, | 25 PasswordStoreX::PasswordStoreX(LoginDatabase* login_db, |
26 Profile* profile, | 26 Profile* profile, |
27 NativeBackend* backend) | 27 NativeBackend* backend) |
28 : PasswordStoreDefault(login_db, profile), | 28 : PasswordStoreDefault(login_db, profile), |
29 backend_(backend), migration_checked_(!backend), allow_fallback_(false) { | 29 backend_(backend), migration_checked_(!backend), allow_fallback_(false) { |
30 } | 30 } |
31 | 31 |
32 PasswordStoreX::~PasswordStoreX() {} | 32 PasswordStoreX::~PasswordStoreX() {} |
33 | 33 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 } // anonymous namespace | 293 } // anonymous namespace |
294 | 294 |
295 // static | 295 // static |
296 void PasswordStoreX::SetPasswordsUseLocalProfileId(PrefService* prefs) { | 296 void PasswordStoreX::SetPasswordsUseLocalProfileId(PrefService* prefs) { |
297 // This method should work on any thread, but we expect the DB thread. | 297 // This method should work on any thread, but we expect the DB thread. |
298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 298 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
299 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 299 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
300 base::Bind(&UISetPasswordsUseLocalProfileId, prefs)); | 300 base::Bind(&UISetPasswordsUseLocalProfileId, prefs)); |
301 } | 301 } |
302 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) | 302 #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX) |
OLD | NEW |