summaryrefslogtreecommitdiffstats
path: root/base/win
Commit message (Collapse)AuthorAgeFilesLines
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-072-104/+113
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6816027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80851 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80819 due to failed testsmmenke@chromium.org2011-04-072-113/+104
| | | | | | | TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/6816024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80824 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-072-104/+113
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6713107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80819 0039d316-1c4b-4281-b951-d872f2087c98
* Base: Last set of files to use BASE_API (for base.dll)rvargas@google.com2011-03-289-32/+47
| | | | | | | | | | Note that a bunck of these files have no unit tests :( BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6747014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79633 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-283-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more files using BASE_API (for base.dll)rvargas@google.com2011-03-251-5/+7
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6733031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79426 0039d316-1c4b-4281-b951-d872f2087c98
* Add an exception wrapper to the WindowProc functions sorvargas@google.com2011-03-173-0/+177
| | | | | | | | | | | that we receive crash reports when something goes wrong. BUG=63702 TEST=base_unittests Review URL: http://codereview.chromium.org/6697004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78475 0039d316-1c4b-4281-b951-d872f2087c98
* Move GetWindowsArchitecture() to windows_version.h.pkasting@chromium.org2011-03-044-25/+25
| | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6624025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76947 0039d316-1c4b-4281-b951-d872f2087c98
* Add a function to get the processor architecture. I will be using this in ↵pkasting@chromium.org2011-03-043-5/+30
| | | | | | | | | | | | the user agent construction code. Also cleans up a few nearby things. BUG=none TEST=none Review URL: http://codereview.chromium.org/6632002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76945 0039d316-1c4b-4281-b951-d872f2087c98
* Create a "GetWOW64Status()" utility function and make the rest of the ↵pkasting@chromium.org2011-03-042-2/+39
| | | | | | | | | | codebase call it. BUG=none TEST=none Review URL: http://codereview.chromium.org/6610029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76854 0039d316-1c4b-4281-b951-d872f2087c98
* More DCHECK() updates. A mixture of _EQ and _GE.mhm@chromium.org2011-03-013-5/+5
| | | | | | | | Bug=58409 Review URL: http://codereview.chromium.org/6469070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76343 0039d316-1c4b-4281-b951-d872f2087c98
* Removed the command line from ServiceProcessState::AddToAutoRun() and had ↵sanjeevr@chromium.org2011-02-252-0/+12
| | | | | | | | | | | the class calculate its own command line. Wired up Linux autorun code and added unit tests. BUG=None TEST=Test service process autorun when enabling the cloud print proxy, unit-tests. Review URL: http://codereview.chromium.org/6591002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76077 0039d316-1c4b-4281-b951-d872f2087c98
* Fix *RegValueWorkItem to handle a case where previous value is empty.amit@chromium.org2011-02-111-1/+1
| | | | | | | | | | | Not handling correctly caused a crash. Added unit tests to cover those cases. BUG=71953 TEST=covered by installer util unit tests Review URL: http://codereview.chromium.org/6485026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74675 0039d316-1c4b-4281-b951-d872f2087c98
* Remove sanity check in RegKey to prevent usage of checkingamit@chromium.org2011-01-212-67/+34
| | | | | | | | | | | | return value as a bool BUG=none TEST=none Review URL: http://codereview.chromium.org/6346010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72110 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary DCHECK causing unit test failure.amit@chromium.org2011-01-191-1/+0
| | | | | | | | | | BUG=none TEST=GoogleUpdateSettings::SetCollectStatsConsent TBR=cevans Review URL: http://codereview.chromium.org/6281008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71773 0039d316-1c4b-4281-b951-d872f2087c98
* Regkey functions return error code instead of boolamit@chromium.org2011-01-194-148/+214
| | | | | | | | | | | | | | | | | | | | | | Change the Regkey helper to consistently use and return LONG instead of bool. Fix RegKey usage all over the code base and get rid of workarounds due to lack of return value. Reviewers: brettw: everything (skip parts for other reviewers if you wish) robertshield,grt: chrome_frame, installer siggi: ceee BUG=none TEST=covered by existing tests Review URL: http://codereview.chromium.org/6090006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71768 0039d316-1c4b-4281-b951-d872f2087c98
* Order function definitions in base/win/registry.cc according to the header.tfarina@chromium.org2011-01-142-162/+168
| | | | | | | | | BUG=68682 TEST=trybots Review URL: http://codereview.chromium.org/6354002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71511 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-093-16/+20
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use ↵thakis@chromium.org2011-01-073-20/+16
| | | | | | | | | | the new location and namespace." This reverts r 70795, it broke the build. TBR=vandebo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_handle_win.h stub and fix up all callers to use the new ↵tfarina@chromium.org2011-01-073-16/+20
| | | | | | | | | | | location and namespace. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
* move base/object_watcher into base/win and add the win namespace. Fixup callers.brettw@google.com2011-01-013-0/+383
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5971008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70360 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-012-2/+2
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/win_util to the base/win directory and use the base::win namespace.brettw@google.com2010-12-313-0/+298
| | | | | | | | | Fix up includes, many files including base/win_util don't actually need it. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70341 0039d316-1c4b-4281-b951-d872f2087c98
* Move rgs_helper out of base to ceee since it's not used anywhere else.brettw@chromium.org2010-12-291-89/+0
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6041007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70280 0039d316-1c4b-4281-b951-d872f2087c98
* Making a few RegKey methods that only read data, const.tommi@chromium.org2010-12-072-11/+12
| | | | | | | | | | | This is so that we can make methods that don't alter the contained HKEY or the data it represents accept const references of RegKey. TEST=none BUG=none Review URL: http://codereview.chromium.org/5623004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68489 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove stub scoped_variant_win.h file.tfarina@chromium.org2010-12-041-1/+1
| | | | | | | | | | | Fix the callers and add base::win in the call sites. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/5507001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68251 0039d316-1c4b-4281-b951-d872f2087c98
* Check if the frame belongs to the browser tree associated with the BHO ↵siggi@chromium.org2010-11-251-0/+5
| | | | | | | | | | | | | | | | | before commiting to creating and binding handlers. Also, replace CComPtr with ScopedPtrHandler. Committing for motek@google.com, original review at http://codereview.chromium.org/5311003/. TEST=unittests in change. BUG=3205224 BUG=3166440 Review URL: http://codereview.chromium.org/5360003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67415 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using Hard Coded copies of GUID strings in RGS files.mad@google.com2010-11-231-0/+89
| | | | | | | | | BUG=0 TEST=Make sure everything works after unregistration and re-registration. Review URL: http://codereview.chromium.org/5113005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67180 0039d316-1c4b-4281-b951-d872f2087c98
* Add infrastructure enabling tests of installer upgrade scenarios.grt@chromium.org2010-11-231-3/+3
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5236002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67099 0039d316-1c4b-4281-b951-d872f2087c98
* Make DeleteKey support GetLastError.tommi@chromium.org2010-11-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | When SHDeleteKey returns, the last error value hasn't been set. With this change, it's possible to have checks like: if (!key.DeleteKey(...) && GetLastError() != ERROR_NOT_FOUND) { HandleErrorCase(); return false; } return true; As it stands, the last error value will always be ERROR_SUCCESS, which is not all that useful. In fact there is code in the installer that attempts to do this, but doesn't currently work correctly (also because it's checking for the wrong GLE value, but I'm fixing that in a separate change). BUG=none TEST=Should have no side effects. Review URL: http://codereview.chromium.org/5182009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67049 0039d316-1c4b-4281-b951-d872f2087c98
* The UI language rather than the locale is now used to pick Chrome's language ↵grt@chromium.org2010-11-163-0/+243
| | | | | | | | | | | | | | | on Windows. (Also fixed some unrelated lint errors.) With this change, l10n_util::GetApplicationLocale first checks for an override of the "configured locale" (in base::i18n) containing the list of preferred Windows UI languages. The browser triggers an override early in startup before the ApplicationLocale is determined. In effect, the browser no longer uses ICU on Windows for language detection. (This locale override mechanism is borrowed from the OS X port.) Changes in Chrome Frame are largely a refactor, as some Win32 code in there has been moved into base/win. Also cleaned up language selection in installer_util so that the proper language is chosen for the EULA, installer messages, and shortcuts. In so doing, replaced hand-crafted lists of supported languages with either auto-generated lists (static consts) or logic so that the addition of translations in the future doesn't require code motion (that being said, there may be reason to update the alias and/or wildcard tables in language_selector.cc). In so doing, this change unlocks Amharic, Farsi, and Swahili translations for installer messages and shortcuts. BUG=39986,40496,26470 TEST=New MUI/Win32 calls are tested in base/win/i18n_unittest.cc. To test the overall functionality, uninstall Chrome, remove intl.app_locale user pref, switch to a supported display language (via the "Keyboards and Languages" tab of Win7's "Regional and Language" control panel, and install with { "distribution": { "require_eula": true } } in master_preferences (via -installerdata arg to setup.exe). If all goes well, both EULA and outer frame are in the same language as Windows. Also, from gwilson: "Install system-level Chrome in audit mode on a new machine, then go through the out-of-box-experience, select a language, and the in -product EULA (triggered by "require_eula" : true) and Chrome's UI should be in the language that the user selected." Review URL: http://codereview.chromium.org/4139010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66275 0039d316-1c4b-4281-b951-d872f2087c98
* Move Windows-specific Event Tracing for Windows implementation to base/win. siggi@chromium.org2010-11-068-0/+1445
| | | | | | | | | | | fix users of same. BUG=none TEST=unittests Review URL: http://codereview.chromium.org/4517004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65310 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on file access checks on Win.jam@chromium.org2010-11-041-0/+24
| | | | | | | | | BUG=60211 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64960 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65075 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 64960 - Turn on file access checks on Win.rafaelw@chromium.org2010-11-031-24/+0
| | | | | | | | | | BUG=60211 Review URL: http://codereview.chromium.org/4222005 TBR=jam@chromium.org Review URL: http://codereview.chromium.org/4431001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64974 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on file access checks on Win.jam@chromium.org2010-11-031-0/+24
| | | | | | | BUG=60211 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64960 0039d316-1c4b-4281-b951-d872f2087c98
* Move pe_image and registry from base to base/win and use the namespace. It ↵brettw@chromium.org2010-10-176-0/+1676
| | | | | | | | | | | | removes windows_message_list which isn't used. This keeps a stub for registry in the old location until we can update that. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3836005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62888 0039d316-1c4b-4281-b951-d872f2087c98
* Address review comment I forgot in scoped_comptr checkin.brettw@chromium.org2010-10-161-3/+2
| | | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62865 0039d316-1c4b-4281-b951-d872f2087c98
* Move the windows-specific scoped_* stuff from base to base/win and in the ↵brettw@chromium.org2010-10-1612-0/+1504
| | | | | | | | | | | | | | | | base::win namespace. This keeps old headers that forward to the new versions and have using declarations that allow the existing code to compile. I fixed all the callers in base to use the new ones, and also the other files I happened to touch. This splits out the stuff from scoped_handle into a few separate files. I just deleted ScopedFindFile since it was only used in one place and it wasn't even really helping there. I removed StackBstr which was a #define and used the "regular" ScopedBstr in the 7 places that used it. This is an optimization to avoid an extra allocation, but none of the callers are remotely performance critical. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3781009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62843 0039d316-1c4b-4281-b951-d872f2087c98
* Move windows version-related stuff out of base/win_util and into ↵brettw@chromium.org2010-10-152-0/+106
base/win/windows_version. Many files now only need to include this instead of all of win_util. Remove a bunch of unused code from base/win_util. There was a surprising amount. Replace the AppUserModel property key with the one from the SDK now that we use the Win7 SDK. Move GetLogonSessionOnlyDACL from win_util to ipc since it's only used in that one place. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62694 0039d316-1c4b-4281-b951-d872f2087c98