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

Side by Side Diff: chrome/installer/mini_installer/configuration.cc

Issue 304673004: Cause mini_installer tests to noop on component builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dear Greg. Created 6 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/installer/mini_installer/configuration.h" 5 #include "chrome/installer/mini_installer/configuration.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> // NOLINT 8 #include <shellapi.h> // NOLINT
9 9
10 #include "chrome/installer/mini_installer/appid.h" 10 #include "chrome/installer/mini_installer/appid.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 chrome_app_guid_ = google_update::kAppGuid; 31 chrome_app_guid_ = google_update::kAppGuid;
32 command_line_ = NULL; 32 command_line_ = NULL;
33 operation_ = INSTALL_PRODUCT; 33 operation_ = INSTALL_PRODUCT;
34 argument_count_ = 0; 34 argument_count_ = 0;
35 has_chrome_ = false; 35 has_chrome_ = false;
36 has_chrome_frame_ = false; 36 has_chrome_frame_ = false;
37 has_app_host_ = false; 37 has_app_host_ = false;
38 is_multi_install_ = false; 38 is_multi_install_ = false;
39 is_system_level_ = false; 39 is_system_level_ = false;
40 query_component_build_ = false;
40 } 41 }
41 42
42 bool Configuration::Initialize() { 43 bool Configuration::Initialize() {
43 return InitializeFromCommandLine(::GetCommandLine()); 44 return InitializeFromCommandLine(::GetCommandLine());
44 } 45 }
45 46
46 // This is its own function so that unit tests can provide their own command 47 // This is its own function so that unit tests can provide their own command
47 // lines. |command_line| is shared with this instance in the sense that this 48 // lines. |command_line| is shared with this instance in the sense that this
48 // instance may refer to it at will throughout its lifetime, yet it will 49 // instance may refer to it at will throughout its lifetime, yet it will
49 // not release it. 50 // not release it.
(...skipping 12 matching lines...) Expand all
62 has_chrome_frame_ = true; 63 has_chrome_frame_ = true;
63 else if ((0 == ::lstrcmpi(args_[i], L"--app-host")) || 64 else if ((0 == ::lstrcmpi(args_[i], L"--app-host")) ||
64 (0 == ::lstrcmpi(args_[i], L"--app-launcher"))) 65 (0 == ::lstrcmpi(args_[i], L"--app-launcher")))
65 has_app_host_ = true; 66 has_app_host_ = true;
66 else if (0 == ::lstrcmpi(args_[i], L"--multi-install")) 67 else if (0 == ::lstrcmpi(args_[i], L"--multi-install"))
67 is_multi_install_ = true; 68 is_multi_install_ = true;
68 else if (0 == ::lstrcmpi(args_[i], L"--system-level")) 69 else if (0 == ::lstrcmpi(args_[i], L"--system-level"))
69 is_system_level_ = true; 70 is_system_level_ = true;
70 else if (0 == ::lstrcmpi(args_[i], L"--cleanup")) 71 else if (0 == ::lstrcmpi(args_[i], L"--cleanup"))
71 operation_ = CLEANUP; 72 operation_ = CLEANUP;
73 else if (0 == ::lstrcmpi(args_[i], L"--query-component-build"))
74 query_component_build_ = true;
72 } 75 }
73 76
74 // Single-install defaults to Chrome. 77 // Single-install defaults to Chrome.
75 if (!is_multi_install_) 78 if (!is_multi_install_)
76 has_chrome_ = !(has_chrome_frame_ || has_app_host_); 79 has_chrome_ = !(has_chrome_frame_ || has_app_host_);
77 } 80 }
78 return args_ != NULL; 81 return args_ != NULL;
79 } 82 }
80 83
81 } // namespace mini_installer 84 } // namespace mini_installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698