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

Unified Diff: chrome/installer/util/chrome_browser_operations.cc

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Index: chrome/installer/util/chrome_browser_operations.cc
===================================================================
--- chrome/installer/util/chrome_browser_operations.cc (revision 0)
+++ chrome/installer/util/chrome_browser_operations.cc (revision 0)
@@ -0,0 +1,78 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/installer/util/chrome_browser_operations.h"
+
+#include "base/command_line.h"
+#include "base/file_path.h"
+#include "base/logging.h"
+#include "chrome/installer/util/browser_distribution.h"
+#include "chrome/installer/util/channel_info.h"
+#include "chrome/installer/util/helper.h"
+#include "chrome/installer/util/master_preferences.h"
+#include "chrome/installer/util/master_preferences_constants.h"
+#include "chrome/installer/util/util_constants.h"
+
+namespace installer {
+
+void ChromeBrowserOperations::ReadOptions(const MasterPreferences& prefs,
+ std::set<std::wstring>* options) {
+ DCHECK(options != NULL);
+
+ bool pref_value;
+
+ if (prefs.GetBool(master_preferences::kMultiInstall, &pref_value) &&
+ pref_value) {
+ options->insert(kOptionMultiInstall);
+ }
+}
+
+void ChromeBrowserOperations::ReadOptions(const CommandLine& uninstall_command,
+ std::set<std::wstring>* options) {
+ DCHECK(options != NULL);
+
+ if (uninstall_command.HasSwitch(switches::kMultiInstall))
+ options->insert(kOptionMultiInstall);
+}
+
+void ChromeBrowserOperations::AddKeyFiles(const std::set<std::wstring>& options,
+ std::vector<FilePath>* key_files) {
+ key_files->push_back(FilePath(installer::kChromeDll));
+}
+
+void ChromeBrowserOperations::AddComDllList(
+ const std::set<std::wstring>& options,
+ std::vector<FilePath>* com_dll_list) {
+}
+
+void ChromeBrowserOperations::AppendProductFlags(
+ const std::set<std::wstring>& options,
+ CommandLine* uninstall_command) {
+ DCHECK(uninstall_command);
+
+ if (options.find(kOptionMultiInstall) != options.end()) {
+ if (!uninstall_command->HasSwitch(switches::kMultiInstall))
+ uninstall_command->AppendSwitch(switches::kMultiInstall);
+ uninstall_command->AppendSwitch(switches::kChrome);
+ }
+}
+
+bool ChromeBrowserOperations::SetChannelFlags(
+ const std::set<std::wstring>& options,
+ bool set,
+ ChannelInfo* channel_info) const {
+#if defined(GOOGLE_CHROME_BUILD)
+ DCHECK(channel_info);
+ return channel_info->SetChrome(set);
+#else
+ return false;
+#endif
+}
+
+bool ChromeBrowserOperations::ShouldCreateUninstallEntry(
+ const std::set<std::wstring>& options) const {
+ return true;
+}
+
+} // namespace installer
Property changes on: chrome\installer\util\chrome_browser_operations.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698