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

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: 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
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 f01f48544c4cfc104ec91fdf58990d45a0022369..dc0774c1e15a492cf6e8c3e29b296d7ae25a1b52 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -134,23 +134,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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698