| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Implementation of DeleteChromeHistory | 5 // Implementation of DeleteChromeHistory |
| 6 #include "chrome_frame/delete_chrome_history.h" | 6 #include "chrome_frame/delete_chrome_history.h" |
| 7 | 7 |
| 8 #include "chrome/browser/browsing_data_remover.h" | 8 #include "chrome/browser/browsing_data_remover.h" |
| 9 | 9 |
| 10 #include "chrome_frame/chrome_frame_activex.h" | 10 #include "chrome_frame/chrome_frame_activex.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 base::IntegrityLevel integrity_level; | 67 base::IntegrityLevel integrity_level; |
| 68 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && | 68 if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA && |
| 69 !base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), | 69 !base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), |
| 70 &integrity_level)) { | 70 &integrity_level)) { |
| 71 return E_UNEXPECTED; | 71 return E_UNEXPECTED; |
| 72 } | 72 } |
| 73 if (integrity_level == base::LOW_INTEGRITY) { | 73 if (integrity_level == base::LOW_INTEGRITY) { |
| 74 return S_OK; | 74 return S_OK; |
| 75 } | 75 } |
| 76 if (!InitializeAutomation(GetHostProcessName(false), L"", false, false, | 76 if (!InitializeAutomation(GetHostProcessName(false), L"", false, false, |
| 77 GURL(), GURL())) { | 77 GURL(), GURL(), true)) { |
| 78 return E_UNEXPECTED; | 78 return E_UNEXPECTED; |
| 79 } | 79 } |
| 80 | 80 |
| 81 if (flags & DELETE_BROWSING_HISTORY_COOKIES) | 81 if (flags & DELETE_BROWSING_HISTORY_COOKIES) |
| 82 remove_mask_ |= BrowsingDataRemover::REMOVE_COOKIES; | 82 remove_mask_ |= BrowsingDataRemover::REMOVE_COOKIES; |
| 83 if (flags & DELETE_BROWSING_HISTORY_TIF) | 83 if (flags & DELETE_BROWSING_HISTORY_TIF) |
| 84 remove_mask_ |= BrowsingDataRemover::REMOVE_CACHE; | 84 remove_mask_ |= BrowsingDataRemover::REMOVE_CACHE; |
| 85 if (flags & DELETE_BROWSING_HISTORY_FORMDATA) | 85 if (flags & DELETE_BROWSING_HISTORY_FORMDATA) |
| 86 remove_mask_ |= BrowsingDataRemover::REMOVE_FORM_DATA; | 86 remove_mask_ |= BrowsingDataRemover::REMOVE_FORM_DATA; |
| 87 if (flags & DELETE_BROWSING_HISTORY_PASSWORDS) | 87 if (flags & DELETE_BROWSING_HISTORY_PASSWORDS) |
| 88 remove_mask_ |= BrowsingDataRemover::REMOVE_PASSWORDS; | 88 remove_mask_ |= BrowsingDataRemover::REMOVE_PASSWORDS; |
| 89 if (flags & DELETE_BROWSING_HISTORY_HISTORY) | 89 if (flags & DELETE_BROWSING_HISTORY_HISTORY) |
| 90 remove_mask_ |= BrowsingDataRemover::REMOVE_HISTORY; | 90 remove_mask_ |= BrowsingDataRemover::REMOVE_HISTORY; |
| 91 | 91 |
| 92 loop_.PostDelayedTask(FROM_HERE, | 92 loop_.PostDelayedTask(FROM_HERE, |
| 93 new MessageLoop::QuitTask, 1000 * 600); | 93 new MessageLoop::QuitTask, 1000 * 600); |
| 94 loop_.MessageLoop::Run(); | 94 loop_.MessageLoop::Run(); |
| 95 | 95 |
| 96 return S_OK; | 96 return S_OK; |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| OLD | NEW |