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

Unified Diff: chrome/installer/gcapi/gcapi_reactivation.cc

Issue 9465013: Mike's change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Roger's feedback. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/gcapi/gcapi_reactivation.h ('k') | chrome/installer/gcapi/gcapi_reactivation_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/gcapi/gcapi_reactivation.cc
diff --git a/chrome/installer/gcapi/gcapi_reactivation.cc b/chrome/installer/gcapi/gcapi_reactivation.cc
index 6755e2fc26256262653c8a40e31bb7b0c879d298..87abc0e8637c075e11abe12c10f717f32f55551b 100644
--- a/chrome/installer/gcapi/gcapi_reactivation.cc
+++ b/chrome/installer/gcapi/gcapi_reactivation.cc
@@ -7,6 +7,7 @@
#include "base/time.h"
#include "base/win/registry.h"
#include "chrome/installer/util/google_update_constants.h"
+#include "chrome/installer/gcapi/gcapi.h"
using base::Time;
using base::win::RegKey;
@@ -44,9 +45,14 @@ bool HasBeenReactivatedByBrandCodes(
return success;
}
-bool SetReactivationBrandCode(const std::wstring& brand_code) {
+bool SetReactivationBrandCode(const std::wstring& brand_code, int shell_mode) {
bool success = false;
+ // This function currently only should be run in a non-elevated shell,
+ // so we return "true" if it is being invoked from an elevated shell.
+ if (shell_mode == GCAPI_INVOKED_UAC_ELEVATION)
+ return true;
+
std::wstring path(google_update::kRegPathClientState);
path += L"\\";
path += google_update::kChromeUpgradeCode;
« no previous file with comments | « chrome/installer/gcapi/gcapi_reactivation.h ('k') | chrome/installer/gcapi/gcapi_reactivation_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698