OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/supervised_user/supervised_user_interstitial.h" | 5 #include "chrome/browser/supervised_user/supervised_user_interstitial.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 base::string16 reason = | 264 base::string16 reason = |
265 l10n_util::GetStringUTF16(supervised_user_error_page::GetBlockMessageID( | 265 l10n_util::GetStringUTF16(supervised_user_error_page::GetBlockMessageID( |
266 reason_, true, second_custodian.empty())); | 266 reason_, true, second_custodian.empty())); |
267 std::string message = l10n_util::GetStringFUTF8( | 267 std::string message = l10n_util::GetStringFUTF8( |
268 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); | 268 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); |
269 #if defined(OS_ANDROID) | 269 #if defined(OS_ANDROID) |
270 DCHECK(profile_->IsChild()); | 270 DCHECK(profile_->IsChild()); |
271 ReportChildAccountFeedback(web_contents_, message, url_); | 271 ReportChildAccountFeedback(web_contents_, message, url_); |
272 #else | 272 #else |
273 chrome::ShowFeedbackPage(chrome::FindBrowserWithWebContents(web_contents_), | 273 chrome::ShowFeedbackPage(chrome::FindBrowserWithWebContents(web_contents_), |
274 message, std::string()); | 274 chrome::kFeedbackSourceSupervisedUserInterstitial, |
| 275 message, std::string() /* category_tag */); |
275 #endif | 276 #endif |
276 return; | 277 return; |
277 } | 278 } |
278 | 279 |
279 NOTREACHED(); | 280 NOTREACHED(); |
280 } | 281 } |
281 | 282 |
282 void SupervisedUserInterstitial::OnProceed() { | 283 void SupervisedUserInterstitial::OnProceed() { |
283 DispatchContinueRequest(true); | 284 DispatchContinueRequest(true); |
284 } | 285 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 SupervisedUserServiceFactory::GetForProfile(profile_); | 348 SupervisedUserServiceFactory::GetForProfile(profile_); |
348 supervised_user_service->RemoveObserver(this); | 349 supervised_user_service->RemoveObserver(this); |
349 | 350 |
350 if (!callback_.is_null()) | 351 if (!callback_.is_null()) |
351 callback_.Run(continue_request); | 352 callback_.Run(continue_request); |
352 | 353 |
353 // After this, the WebContents may be destroyed. Make sure we don't try to use | 354 // After this, the WebContents may be destroyed. Make sure we don't try to use |
354 // it again. | 355 // it again. |
355 web_contents_ = nullptr; | 356 web_contents_ = nullptr; |
356 } | 357 } |
OLD | NEW |