Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Side by Side Diff: chrome/browser/supervised_user/supervised_user_interstitial.cc

Issue 2844193002: Add UMA histogram to track the various sources that request the feedback app (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, "" /* category_tag */);
Lei Zhang 2017/04/27 21:25:07 Leave the std::string()s alone. Since ShowFeedback
afakhry 2017/04/27 21:39:54 Done.
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/feedback/show_feedback_page.cc ('k') | chrome/browser/ui/ash/chrome_new_window_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698