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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 int GetRemovalMask() { | 52 int GetRemovalMask() { |
53 return called_with_details_->removal_mask; | 53 return called_with_details_->removal_mask; |
54 } | 54 } |
55 | 55 |
56 int GetOriginSetMask() { | 56 int GetOriginSetMask() { |
57 return called_with_details_->origin_set_mask; | 57 return called_with_details_->origin_set_mask; |
58 } | 58 } |
59 | 59 |
60 protected: | 60 protected: |
61 virtual void SetUpOnMainThread() OVERRIDE { | 61 virtual void SetUpOnMainThread() override { |
62 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails()); | 62 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails()); |
63 registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED, | 63 registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED, |
64 content::Source<Profile>(browser()->profile())); | 64 content::Source<Profile>(browser()->profile())); |
65 } | 65 } |
66 | 66 |
67 // content::NotificationObserver implementation. | 67 // content::NotificationObserver implementation. |
68 virtual void Observe(int type, | 68 virtual void Observe(int type, |
69 const content::NotificationSource& source, | 69 const content::NotificationSource& source, |
70 const content::NotificationDetails& details) OVERRIDE { | 70 const content::NotificationDetails& details) override { |
71 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED); | 71 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED); |
72 | 72 |
73 // We're not taking ownership of the details object, but storing a copy of | 73 // We're not taking ownership of the details object, but storing a copy of |
74 // it locally. | 74 // it locally. |
75 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails( | 75 called_with_details_.reset(new BrowsingDataRemover::NotificationDetails( |
76 *content::Details<BrowsingDataRemover::NotificationDetails>( | 76 *content::Details<BrowsingDataRemover::NotificationDetails>( |
77 details).ptr())); | 77 details).ptr())); |
78 } | 78 } |
79 | 79 |
80 int GetAsMask(const base::DictionaryValue* dict, std::string path, | 80 int GetAsMask(const base::DictionaryValue* dict, std::string path, |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SetPrefsAndVerifySettings( | 526 SetPrefsAndVerifySettings( |
527 BrowsingDataRemover::REMOVE_COOKIES | | 527 BrowsingDataRemover::REMOVE_COOKIES | |
528 BrowsingDataRemover::REMOVE_HISTORY | | 528 BrowsingDataRemover::REMOVE_HISTORY | |
529 BrowsingDataRemover::REMOVE_DOWNLOADS, | 529 BrowsingDataRemover::REMOVE_DOWNLOADS, |
530 UNPROTECTED_WEB, | 530 UNPROTECTED_WEB, |
531 site_data_no_plugins | | 531 site_data_no_plugins | |
532 BrowsingDataRemover::REMOVE_HISTORY | | 532 BrowsingDataRemover::REMOVE_HISTORY | |
533 BrowsingDataRemover::REMOVE_DOWNLOADS); | 533 BrowsingDataRemover::REMOVE_DOWNLOADS); |
534 } | 534 } |
OLD | NEW |