Chromium Code Reviews| Index: chrome/install_static/user_data_dir.h |
| diff --git a/chrome/install_static/user_data_dir.h b/chrome/install_static/user_data_dir.h |
| index f7b35ec428ee187f02931b269401199164b9c8d8..30b46b2c6c562903c7244c224aed4624791524c3 100644 |
| --- a/chrome/install_static/user_data_dir.h |
| +++ b/chrome/install_static/user_data_dir.h |
| @@ -25,19 +25,21 @@ struct InstallConstants; |
| // function once on startup and use the result for subsequent callers, otherwise |
| // there's a race with registry modification (which could cause a different |
| // derivation) so different subsystems would see different values). In normal |
| -// usage, it should be called only once and cached. GetUserDataDirectory() does |
| -// this, and should be preferred. |
| -bool GetUserDataDirectoryImpl( |
| +// usage, it should be called only once and cached. |
| +bool DeriveUserDataDirectoryImpl( |
| const std::wstring& user_data_dir_from_command_line, |
| const InstallConstants& mode, |
| std::wstring* result, |
| std::wstring* invalid_supplied_directory); |
| // Retrieves the user data directory, and any invalid directory specified on the |
| -// command line, for reporting an error to the user. These values are cached on |
| -// the first call. |invalid_user_data_directory| may be null if not required. |
| -bool GetUserDataDirectory(std::wstring* user_data_directory, |
| - std::wstring* invalid_user_data_directory); |
| +// command line, for reporting an error to the user. This function should only |
| +// be called once on startup and the result should be cached, to avoid |
| +// derivation inconsistencies. |invalid_user_data_directory| may be null if not |
|
grt (UTC plus 2)
2017/05/23 15:25:02
If the function is only supposed to be called once
manzagop (departed)
2017/05/23 15:41:31
And it's now become incorrect. Updated comment. Do
|
| +// required. |
| +bool DeriveUserDataDirectory(const InstallConstants& mode, |
| + std::wstring* user_data_directory, |
| + std::wstring* invalid_user_data_directory); |
| } // namespace install_static |