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/browsing_data/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 AwaitCompletionHelper await_completion_; | 444 AwaitCompletionHelper await_completion_; |
445 | 445 |
446 DISALLOW_COPY_AND_ASSIGN(RemoveHistoryTester); | 446 DISALLOW_COPY_AND_ASSIGN(RemoveHistoryTester); |
447 }; | 447 }; |
448 | 448 |
449 class RemoveAutofillTester : public autofill::PersonalDataManagerObserver { | 449 class RemoveAutofillTester : public autofill::PersonalDataManagerObserver { |
450 public: | 450 public: |
451 explicit RemoveAutofillTester(TestingProfile* profile) | 451 explicit RemoveAutofillTester(TestingProfile* profile) |
452 : personal_data_manager_( | 452 : personal_data_manager_( |
453 autofill::PersonalDataManagerFactory::GetForProfile(profile)) { | 453 autofill::PersonalDataManagerFactory::GetForProfile(profile)) { |
454 autofill::test::DisableSystemServices(profile); | 454 autofill::test::DisableSystemServices(profile->GetPrefs()); |
455 personal_data_manager_->AddObserver(this); | 455 personal_data_manager_->AddObserver(this); |
456 } | 456 } |
457 | 457 |
458 virtual ~RemoveAutofillTester() { | 458 virtual ~RemoveAutofillTester() { |
459 personal_data_manager_->RemoveObserver(this); | 459 personal_data_manager_->RemoveObserver(this); |
460 } | 460 } |
461 | 461 |
462 // Returns true if there are autofill profiles. | 462 // Returns true if there are autofill profiles. |
463 bool HasProfile() { | 463 bool HasProfile() { |
464 return !personal_data_manager_->GetProfiles().empty() && | 464 return !personal_data_manager_->GetProfiles().empty() && |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 EXPECT_CALL(*cryptohome_client, TpmAttestationDeleteKeys(_, _, _, _)) | 1596 EXPECT_CALL(*cryptohome_client, TpmAttestationDeleteKeys(_, _, _, _)) |
1597 .WillOnce(WithArgs<3>(Invoke(FakeDBusCall))); | 1597 .WillOnce(WithArgs<3>(Invoke(FakeDBusCall))); |
1598 | 1598 |
1599 BlockUntilBrowsingDataRemoved( | 1599 BlockUntilBrowsingDataRemoved( |
1600 BrowsingDataRemover::EVERYTHING, | 1600 BrowsingDataRemover::EVERYTHING, |
1601 BrowsingDataRemover::REMOVE_CONTENT_LICENSES, false); | 1601 BrowsingDataRemover::REMOVE_CONTENT_LICENSES, false); |
1602 | 1602 |
1603 chromeos::DBusThreadManager::Shutdown(); | 1603 chromeos::DBusThreadManager::Shutdown(); |
1604 } | 1604 } |
1605 #endif | 1605 #endif |
OLD | NEW |