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

Unified Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 607573002: Small fixes to SRTPRompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved histograms.xml to another CL, and added a histogram rename. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/srt_global_error_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/sw_reporter_installer_win.cc
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index 693f94e21def3fa0627a2022d3708ec154a55e7b..f7beb46f81dfaacf0fd5411bf88a86ed98f615f1 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -141,23 +141,23 @@ void ReportAndClearExitCode(int exit_code, const std::string& version) {
Browser* browser = chrome::FindLastActiveWithHostDesktopType(desktop_type);
if (browser) {
Profile* profile = browser->profile();
+ // Don't show the prompt again if it's been shown before for this profile.
DCHECK(profile);
- // Now that we have a profile, make sure we have a tabbed browser since we
- // need to anchor the bubble to the toolbar's wrench menu. Create one if
- // none exist already.
- if (browser->type() != Browser::TYPE_TABBED) {
- browser = chrome::FindTabbedBrowser(profile, false, desktop_type);
- if (!browser)
- browser = new Browser(Browser::CreateParams(profile, desktop_type));
- }
const std::string prompt_version =
profile->GetPrefs()->GetString(prefs::kSwReporterPromptVersion);
- // Don't show the prompt again if it's been shown before.
if (prompt_version.empty()) {
profile->GetPrefs()->SetString(prefs::kSwReporterPromptVersion,
version);
profile->GetPrefs()->SetInteger(prefs::kSwReporterPromptReason,
exit_code);
+ // Now that we have a profile, make sure we have a tabbed browser since
+ // we need to anchor the bubble to the toolbar's wrench menu. Create one
+ // if none exist already.
+ if (browser->type() != Browser::TYPE_TABBED) {
+ browser = chrome::FindTabbedBrowser(profile, false, desktop_type);
+ if (!browser)
+ browser = new Browser(Browser::CreateParams(profile, desktop_type));
+ }
GlobalErrorService* global_error_service =
GlobalErrorServiceFactory::GetForProfile(profile);
SRTGlobalError* global_error = new SRTGlobalError(global_error_service);
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/srt_global_error_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698