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

Side by Side Diff: chrome/browser/recovery/recovery_install_global_error.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/recovery/recovery_install_global_error.h" 5 #include "chrome/browser/recovery/recovery_install_global_error.h"
6 6
7 #include "base/prefs/pref_service.h"
8 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/component_updater/recovery_component_installer.h" 9 #include "chrome/browser/component_updater/recovery_component_installer.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/global_error/global_error_service.h" 11 #include "chrome/browser/ui/global_error/global_error_service.h"
13 #include "chrome/browser/ui/global_error/global_error_service_factory.h" 12 #include "chrome/browser/ui/global_error/global_error_service_factory.h"
14 #include "chrome/browser/upgrade_detector.h" 13 #include "chrome/browser/upgrade_detector.h"
15 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "components/prefs/pref_service.h"
17 #include "grit/chromium_strings.h" 17 #include "grit/chromium_strings.h"
18 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
19 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
20 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
21 21
22 RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile) 22 RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
23 : elevation_needed_(false), 23 : elevation_needed_(false),
24 profile_(profile), 24 profile_(profile),
25 has_shown_bubble_view_(false) { 25 has_shown_bubble_view_(false) {
26 GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(this); 26 GlobalErrorServiceFactory::GetForProfile(profile_)->AddGlobalError(this);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 DCHECK(pref->FindPreference(prefs::kRecoveryComponentNeedsElevation)); 145 DCHECK(pref->FindPreference(prefs::kRecoveryComponentNeedsElevation));
146 elevation_needed_ = pref->GetBoolean(prefs::kRecoveryComponentNeedsElevation); 146 elevation_needed_ = pref->GetBoolean(prefs::kRecoveryComponentNeedsElevation);
147 147
148 // Got a new elevation request, resets |has_shown_bubble_view_| so the 148 // Got a new elevation request, resets |has_shown_bubble_view_| so the
149 // bubble has a higher priority to show. 149 // bubble has a higher priority to show.
150 if (elevation_needed_) 150 if (elevation_needed_)
151 has_shown_bubble_view_ = false; 151 has_shown_bubble_view_ = false;
152 152
153 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this); 153 GlobalErrorServiceFactory::GetForProfile(profile_)->NotifyErrorsChanged(this);
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/recovery/recovery_install_global_error.h ('k') | chrome/browser/referrer_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698