OLD | NEW |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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/ui/webui/settings/chrome_cleanup_handler.h" | 5 #include "chrome/browser/ui/webui/settings/chrome_cleanup_handler.h" |
6 | 6 |
| 7 #include <string> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
8 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
9 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
10 #include "base/values.h" | 12 #include "base/values.h" |
11 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" | 13 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" |
12 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
13 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
14 #include "content/public/browser/web_ui.h" | 16 #include "content/public/browser/web_ui.h" |
15 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
16 | 18 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 141 |
140 CallJavascriptFunction("cr.webUIListenerCallback", | 142 CallJavascriptFunction("cr.webUIListenerCallback", |
141 base::Value("chrome-cleanup-on-dismiss")); | 143 base::Value("chrome-cleanup-on-dismiss")); |
142 // TODO(proberge): Show a prompt to reboot the system. | 144 // TODO(proberge): Show a prompt to reboot the system. |
143 } | 145 } |
144 | 146 |
145 void ChromeCleanupHandler::HandleStartCleanup(const base::ListValue* args) { | 147 void ChromeCleanupHandler::HandleStartCleanup(const base::ListValue* args) { |
146 DCHECK_EQ(0U, args->GetSize()); | 148 DCHECK_EQ(0U, args->GetSize()); |
147 | 149 |
148 controller_->ReplyWithUserResponse( | 150 controller_->ReplyWithUserResponse( |
149 profile_, ChromeCleanerController::UserResponse::kAccepted); | 151 // TODO(proberge): Send kAcceptedWithLogs or kAcceptedWithoutLogs based on |
| 152 // the state of a logs upload permissions checkbox. |
| 153 profile_, ChromeCleanerController::UserResponse::kAcceptedWithoutLogs); |
150 } | 154 } |
151 | 155 |
152 } // namespace settings | 156 } // namespace settings |
OLD | NEW |