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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/installer/util/chrome_browser_operations.h"
6
7 #include "base/command_line.h"
8 #include "base/file_path.h"
9 #include "base/logging.h"
10 #include "chrome/installer/util/browser_distribution.h"
11 #include "chrome/installer/util/channel_info.h"
12 #include "chrome/installer/util/helper.h"
13 #include "chrome/installer/util/master_preferences.h"
14 #include "chrome/installer/util/master_preferences_constants.h"
15 #include "chrome/installer/util/util_constants.h"
16
17 namespace installer {
18
19 void ChromeBrowserOperations::ReadOptions(
20 const MasterPreferences& prefs,
21 std::set<std::wstring>* options) const {
22 DCHECK(options);
23
24 bool pref_value;
25
26 if (prefs.GetBool(master_preferences::kMultiInstall, &pref_value) &&
27 pref_value) {
28 options->insert(kOptionMultiInstall);
29 }
30 }
31
32 void ChromeBrowserOperations::ReadOptions(
33 const CommandLine& uninstall_command,
34 std::set<std::wstring>* options) const {
35 DCHECK(options);
36
37 if (uninstall_command.HasSwitch(switches::kMultiInstall))
38 options->insert(kOptionMultiInstall);
39 }
40
41 void ChromeBrowserOperations::AddKeyFiles(
42 const std::set<std::wstring>& options,
43 std::vector<FilePath>* key_files) const {
44 DCHECK(key_files);
45 key_files->push_back(FilePath(installer::kChromeDll));
46 }
47
48 void ChromeBrowserOperations::AddComDllList(
49 const std::set<std::wstring>& options,
50 std::vector<FilePath>* com_dll_list) const {
51 }
52
53 void ChromeBrowserOperations::AppendProductFlags(
54 const std::set<std::wstring>& options,
55 CommandLine* uninstall_command) const {
56 DCHECK(uninstall_command);
57
58 if (options.find(kOptionMultiInstall) != options.end()) {
59 if (!uninstall_command->HasSwitch(switches::kMultiInstall))
60 uninstall_command->AppendSwitch(switches::kMultiInstall);
61 uninstall_command->AppendSwitch(switches::kChrome);
62 }
63 }
64
65 bool ChromeBrowserOperations::SetChannelFlags(
66 const std::set<std::wstring>& options,
67 bool set,
68 ChannelInfo* channel_info) const {
69 #if defined(GOOGLE_CHROME_BUILD)
70 DCHECK(channel_info);
71 return channel_info->SetChrome(set);
72 #else
73 return false;
74 #endif
75 }
76
77 bool ChromeBrowserOperations::ShouldCreateUninstallEntry(
78 const std::set<std::wstring>& options) const {
79 return true;
80 }
81
82 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/chrome_browser_operations.h ('k') | chrome/installer/util/chrome_browser_sxs_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698