| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 l10n_util::GetStringUTF16(supervised_user_error_page::GetBlockMessageID( | 255 l10n_util::GetStringUTF16(supervised_user_error_page::GetBlockMessageID( |
| 256 reason_, true, second_custodian.empty())); | 256 reason_, true, second_custodian.empty())); |
| 257 std::string message = l10n_util::GetStringFUTF8( | 257 std::string message = l10n_util::GetStringFUTF8( |
| 258 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); | 258 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); |
| 259 #if defined(OS_ANDROID) | 259 #if defined(OS_ANDROID) |
| 260 DCHECK(profile_->IsChild()); | 260 DCHECK(profile_->IsChild()); |
| 261 ReportChildAccountFeedback(web_contents_, message, url_); | 261 ReportChildAccountFeedback(web_contents_, message, url_); |
| 262 #else | 262 #else |
| 263 chrome::ShowFeedbackPage(chrome::FindBrowserWithWebContents(web_contents_), | 263 chrome::ShowFeedbackPage(chrome::FindBrowserWithWebContents(web_contents_), |
| 264 chrome::kFeedbackSourceSupervisedUserInterstitial, | 264 chrome::kFeedbackSourceSupervisedUserInterstitial, |
| 265 message, std::string() /* category_tag */); | 265 message, std::string() /* category_tag */, |
| 266 std::string() /* extra_diagnostics */); |
| 266 #endif | 267 #endif |
| 267 return; | 268 return; |
| 268 } | 269 } |
| 269 | 270 |
| 270 NOTREACHED(); | 271 NOTREACHED(); |
| 271 } | 272 } |
| 272 | 273 |
| 273 void SupervisedUserInterstitial::OnProceed() { | 274 void SupervisedUserInterstitial::OnProceed() { |
| 274 DispatchContinueRequest(true); | 275 DispatchContinueRequest(true); |
| 275 } | 276 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 SupervisedUserService* supervised_user_service = | 343 SupervisedUserService* supervised_user_service = |
| 343 SupervisedUserServiceFactory::GetForProfile(profile_); | 344 SupervisedUserServiceFactory::GetForProfile(profile_); |
| 344 supervised_user_service->RemoveObserver(this); | 345 supervised_user_service->RemoveObserver(this); |
| 345 | 346 |
| 346 callback_.Run(continue_request); | 347 callback_.Run(continue_request); |
| 347 | 348 |
| 348 // After this, the WebContents may be destroyed. Make sure we don't try to use | 349 // After this, the WebContents may be destroyed. Make sure we don't try to use |
| 349 // it again. | 350 // it again. |
| 350 web_contents_ = nullptr; | 351 web_contents_ = nullptr; |
| 351 } | 352 } |
| OLD | NEW |