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

Side by Side Diff: chrome/installer/util/product.h

Issue 10826144: Delete both regular and Metro user data dirs on uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: factored in gab's comments Created 8 years, 4 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
« no previous file with comments | « chrome/installer/util/helper.cc ('k') | chrome/installer/util/product.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_INSTALLER_UTIL_PRODUCT_H_ 5 #ifndef CHROME_INSTALLER_UTIL_PRODUCT_H_
6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_ 6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 // Returns true if the set of options is mutated by this operation. 71 // Returns true if the set of options is mutated by this operation.
72 bool SetOption(const std::wstring& option, bool set) { 72 bool SetOption(const std::wstring& option, bool set) {
73 if (set) 73 if (set)
74 return options_.insert(option).second; 74 return options_.insert(option).second;
75 else 75 else
76 return options_.erase(option) != 0; 76 return options_.erase(option) != 0;
77 } 77 }
78 78
79 // Returns the path to the directory that holds the user data. This is always 79 // Returns the path(s) to the directory that holds the user data (primary
80 // inside "Users\<user>\Local Settings". Note that this is the default user 80 // and, if applicable to |dist|, alternate). This is always inside a user's
81 // data directory and does not take into account that it can be overriden with 81 // local application data folder (e.g., "AppData\Local or "Local
82 // a command line parameter. 82 // Settings\Application Data" in %USERPROFILE%). Note that these are the
83 FilePath GetUserDataPath() const; 83 // defaults and do not take into account that they can be overriden with a
84 // command line parameter. |paths| may be empty on return, but is guaranteed
85 // not to contain empty paths otherwise. If more than one path is returned,
86 // they are guaranteed to be siblings.
87 void GetUserDataPaths(std::vector<FilePath>* paths) const;
84 88
85 // Launches Chrome without waiting for it to exit. 89 // Launches Chrome without waiting for it to exit.
86 bool LaunchChrome(const FilePath& application_path) const; 90 bool LaunchChrome(const FilePath& application_path) const;
87 91
88 // Launches Chrome with given command line, waits for Chrome indefinitely 92 // Launches Chrome with given command line, waits for Chrome indefinitely
89 // (until it terminates), and gets the process exit code if available. 93 // (until it terminates), and gets the process exit code if available.
90 // The function returns true as long as Chrome is successfully launched. 94 // The function returns true as long as Chrome is successfully launched.
91 // The status of Chrome at the return of the function is given by exit_code. 95 // The status of Chrome at the return of the function is given by exit_code.
92 // NOTE: The 'options' CommandLine object should only contain parameters. 96 // NOTE: The 'options' CommandLine object should only contain parameters.
93 // The program part will be ignored. 97 // The program part will be ignored.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 scoped_ptr<ProductOperations> operations_; 132 scoped_ptr<ProductOperations> operations_;
129 std::set<std::wstring> options_; 133 std::set<std::wstring> options_;
130 134
131 private: 135 private:
132 DISALLOW_COPY_AND_ASSIGN(Product); 136 DISALLOW_COPY_AND_ASSIGN(Product);
133 }; 137 };
134 138
135 } // namespace installer 139 } // namespace installer
136 140
137 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ 141 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/helper.cc ('k') | chrome/installer/util/product.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698