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

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(const MasterPreferences& prefs,
20 std::set<std::wstring>* options) {
21 DCHECK(options != NULL);
22
23 bool pref_value;
24
25 if (prefs.GetBool(master_preferences::kMultiInstall, &pref_value) &&
26 pref_value) {
27 options->insert(kOptionMultiInstall);
28 }
29 }
30
31 void ChromeBrowserOperations::ReadOptions(const CommandLine& uninstall_command,
32 std::set<std::wstring>* options) {
33 DCHECK(options != NULL);
34
35 if (uninstall_command.HasSwitch(switches::kMultiInstall))
36 options->insert(kOptionMultiInstall);
37 }
38
39 void ChromeBrowserOperations::AddKeyFiles(const std::set<std::wstring>& options,
40 std::vector<FilePath>* key_files) {
41 key_files->push_back(FilePath(installer::kChromeDll));
42 }
43
44 void ChromeBrowserOperations::AddComDllList(
45 const std::set<std::wstring>& options,
46 std::vector<FilePath>* com_dll_list) {
47 }
48
49 void ChromeBrowserOperations::AppendProductFlags(
50 const std::set<std::wstring>& options,
51 CommandLine* uninstall_command) {
52 DCHECK(uninstall_command);
53
54 if (options.find(kOptionMultiInstall) != options.end()) {
55 if (!uninstall_command->HasSwitch(switches::kMultiInstall))
56 uninstall_command->AppendSwitch(switches::kMultiInstall);
57 uninstall_command->AppendSwitch(switches::kChrome);
58 }
59 }
60
61 bool ChromeBrowserOperations::SetChannelFlags(
62 const std::set<std::wstring>& options,
63 bool set,
64 ChannelInfo* channel_info) const {
65 #if defined(GOOGLE_CHROME_BUILD)
66 DCHECK(channel_info);
67 return channel_info->SetChrome(set);
68 #else
69 return false;
70 #endif
71 }
72
73 bool ChromeBrowserOperations::ShouldCreateUninstallEntry(
74 const std::set<std::wstring>& options) const {
75 return true;
76 }
77
78 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698