| 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 "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 } | 322 } |
| 323 | 323 |
| 324 if (command == "\"feedback\"") { | 324 if (command == "\"feedback\"") { |
| 325 base::string16 reason = l10n_util::GetStringUTF16( | 325 base::string16 reason = l10n_util::GetStringUTF16( |
| 326 SupervisedUserURLFilter::GetBlockMessageID(reason_)); | 326 SupervisedUserURLFilter::GetBlockMessageID(reason_)); |
| 327 std::string message = l10n_util::GetStringFUTF8( | 327 std::string message = l10n_util::GetStringFUTF8( |
| 328 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); | 328 IDS_BLOCK_INTERSTITIAL_DEFAULT_FEEDBACK_TEXT, reason); |
| 329 #if defined(OS_ANDROID) | 329 #if defined(OS_ANDROID) |
| 330 ReportChildAccountFeedback(web_contents_, message, url_); | 330 ReportChildAccountFeedback(web_contents_, message, url_); |
| 331 #else | 331 #else |
| 332 std::string bucket; | 332 chrome::ShowFeedbackPage(chrome::FindBrowserWithWebContents(web_contents_), |
| 333 #if defined(OS_CHROMEOS) | 333 message, std::string()); |
| 334 bucket = "UnicornCrOS"; | |
| 335 #else | |
| 336 bucket = "UnicornDesktop"; | |
| 337 #endif | |
| 338 chrome::ShowFeedbackPage( | |
| 339 chrome::FindBrowserWithWebContents(web_contents_), | |
| 340 message, | |
| 341 bucket); | |
| 342 #endif | 334 #endif |
| 343 return; | 335 return; |
| 344 } | 336 } |
| 345 | 337 |
| 346 NOTREACHED(); | 338 NOTREACHED(); |
| 347 } | 339 } |
| 348 | 340 |
| 349 void SupervisedUserInterstitial::OnProceed() { | 341 void SupervisedUserInterstitial::OnProceed() { |
| 350 DispatchContinueRequest(true); | 342 DispatchContinueRequest(true); |
| 351 } | 343 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 SupervisedUserServiceFactory::GetForProfile(profile_); | 386 SupervisedUserServiceFactory::GetForProfile(profile_); |
| 395 supervised_user_service->RemoveObserver(this); | 387 supervised_user_service->RemoveObserver(this); |
| 396 | 388 |
| 397 BrowserThread::PostTask( | 389 BrowserThread::PostTask( |
| 398 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request)); | 390 BrowserThread::IO, FROM_HERE, base::Bind(callback_, continue_request)); |
| 399 | 391 |
| 400 // After this, the WebContents may be destroyed. Make sure we don't try to use | 392 // After this, the WebContents may be destroyed. Make sure we don't try to use |
| 401 // it again. | 393 // it again. |
| 402 web_contents_ = NULL; | 394 web_contents_ = NULL; |
| 403 } | 395 } |
| OLD | NEW |