summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
Commit message (Collapse)AuthorAgeFilesLines
* Mark download tests as flaky on all platform, just the sad truth.phajdan.jr@chromium.org2010-02-101-21/+17
| | | | | | | | | | TBR=dglazkov, kuchhal TEST=still flaky BUG=35275, 20809 Review URL: http://codereview.chromium.org/601030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38630 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in DownloadFile::Rename where we need to seek to the end of the file.jianli@chromium.org2010-02-102-1/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/601018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38628 0039d316-1c4b-4281-b951-d872f2087c98
* Disable DownloadTest.DownloadMimeType for now.jianli@chromium.org2010-02-101-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=mpcomplete Review URL: http://codereview.chromium.org/595015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38558 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor DragDownloadFile so that it can be used by both Windows and MacOSX.jianli@chromium.org2010-02-1010-348/+493
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/572014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38545 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Reduce header dependencies in chrome.phajdan.jr@chromium.org2010-02-092-6/+6
| | | | | | | | | BUG=none TEST=If it compiles it is perfect. Review URL: http://codereview.chromium.org/585008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38463 0039d316-1c4b-4281-b951-d872f2087c98
* Show the filebrowse ui rather than the download shelf in chromeos.xiyuan@chromium.org2010-02-051-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cl displays the filebrowse ui rather than download shelf for downloads in chrom(e|ium) os. It conditionally replaces (with preprocessor macros) the Browser::OnStartDownload method to do this. The cl adds a static FileBrowseUI::OpenPopup(profile, hashArgument), which opens the file browse ui and passes it the provided hash argument. This is invoked directly from Browser::OnStartDownload. The USBMountObserver code was changed to call this static method, rather than open the popup by hand as it had been doing. I'm not sure about ownership of the Browser* returned by OpenPopup, but based on other code in the tree I assume chrome will deal with freeing it when appropriate. Before this change, USBMountObserver would add the window to registrar_ *before* showing it. Now that FileBrowseUI::OpenPopup returns a which which is already visible, this is no longer the case. I assume this won't be a problem. Commit this for rginda. Original review: http://codereview.chromium.org/555167 BUG=none TEST=none Review URL: http://codereview.chromium.org/564022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38222 0039d316-1c4b-4281-b951-d872f2087c98
* BSD port: another chunk of chrome/browser ifdef cleaningpvalchev@google.com2010-02-032-11/+11
| | | | | | Review URL: http://codereview.chromium.org/553153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38004 0039d316-1c4b-4281-b951-d872f2087c98
* Add temporary download progress overlay to the dock icon for the Mac (real ↵avi@chromium.org2010-02-014-0/+58
| | | | | | | | | | | UI coming soon), and provide the hooks for the Win7 implementation. BUG=http://crbug.com/8039 TEST=download; see progress in the dock icon Review URL: http://codereview.chromium.org/545157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37698 0039d316-1c4b-4281-b951-d872f2087c98
* Replace GtkFileChooser with file browser for ChromeOSxiyuan@chromium.org2010-01-292-0/+115
| | | | | | | | | | | | | - Remove dialogs_gtk.cc and add select_file_dialog.cc for chrome os build; - select_file_dialog.cc provides a SelectFileDialogImpl that serves file browse html via HTMLDialogUI; BUG=none TEST=none Review URL: http://codereview.chromium.org/543137 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37547 0039d316-1c4b-4281-b951-d872f2087c98
* Add infobar warning user of extension install failure when trying to install ↵estade@chromium.org2010-01-261-5/+25
| | | | | | | | | | in incognito mode. BUG=27945 Review URL: http://codereview.chromium.org/543155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37162 0039d316-1c4b-4281-b951-d872f2087c98
* Default to FOLDERID_Downloads on Windows Vista/7 when safe.dimich@google.com2010-01-251-0/+6
| | | | | | | | | Landing for DCheng@. Codereview: http://codereview.chromium.org/553040 TEST=none BUG=13610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37023 0039d316-1c4b-4281-b951-d872f2087c98
* Don't accidentally add downloads with db_handle = kUninitializedHandle, ↵thestig@chromium.org2010-01-212-13/+32
| | | | | | | | | | which can happen if the sqlite history db is corrupt / offline. BUG=25492 TEST=none Review URL: http://codereview.chromium.org/492017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36736 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize is_extension_install_ properly.craig.schlenter@chromium.org2010-01-201-0/+1
| | | | | | | | | | BUG=32541 TEST=Start chromium a couple of times, click on downloaded PDFs and make sure none of them are misinterpreted as an extension install. Review URL: http://codereview.chromium.org/542114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36630 0039d316-1c4b-4281-b951-d872f2087c98
* Support dragging a virtual file out of the browser.jianli@chromium.org2010-01-1512-52/+480
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/351029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36378 0039d316-1c4b-4281-b951-d872f2087c98
* Fix by gdk (Garret Kelly)rolandsteiner@chromium.org2010-01-132-4/+6
| | | | | | | | | | | | | | | Resolve issue 30641 Extension files were being selected for auto-open even though an install of the extension was not requested. This patch changes this behaviour so that download an extension (that's not explicitly requested as an extension install) does not force an attempt to install it. BUG=30641 TEST=Right-click an extension link and "Save Link As...". Download appears in shelf. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36106 0039d316-1c4b-4281-b951-d872f2087c98
* Handle extensions correctly when the default download location is not writablekinuko@chromium.org2009-12-253-34/+25
| | | | | | | | | | | | | | | | | | | | BUG=28668 TEST=Set the Download location a NON-writable location (such as '/Application' on Mac) in 'Under the Hood' preferences. Make sure 'Ask where to save...' is kept unchecked. Go to 'https://tools.google.com/chrome/intl/en/themes/index.html' and click 'apply theme'. Make sure 'Save as...' dialog opens to ask users for an alternative download location. Save the file in a writable directory. Make sure the theme applies (or an extension installation dialog opens for extensions). Make sure the download does NOT appear in Downloads history. Make sure it also works for chrome extensions. TEST=(regression) Make sure theme/extension installation works as expected in normal cases (when the default download location is pointing to a writable location and 'Ask where to save...' is unchecked in 'Under the Hood' preferences.) Make sure the download does NOT appear in Downloads history. Make sure the same thing happens for chrome extensions. TEST=(regression) Make sure right-clicking on theme/extension files and selecting 'Save link as...' works as a normal download. Make sure the file is downloaded and saved with the given name. Make sure the theme does NOT apply and an extension installation dialog does NOT open. Make sure the download appears in Downloads history. Review URL: http://codereview.chromium.org/486009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35269 0039d316-1c4b-4281-b951-d872f2087c98
* Chromium to use upstream WebPageSerializer instead of glue/DomSerializer.yaar@chromium.org2009-12-231-6/+6
| | | | | | | | See corresponding changes in webkit here: https://bugs.webkit.org/show_bug.cgi?id=31737 Review URL: http://codereview.chromium.org/434087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35216 0039d316-1c4b-4281-b951-d872f2087c98
* Only show gray LOADING dialog for Themes.rafaelw@chromium.org2009-12-161-1/+2
| | | | | | | | | | | The patch changes the behavior of the LOADING dialog such that it is only shown for extension downloads from the mini-gallery (theme) url. Note that this means that themes from the chrome extensions gallery will also NOT have the dialog shown. BUG=29628 TEST=Install an theme from https://tools.google.com/chrome/intl/pt/themes/index.html. The gray LOADING dialog should appear. Install extension or theme from chrome.google.com/extensions. No LOADING dialog should appear Review URL: http://codereview.chromium.org/507016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34733 0039d316-1c4b-4281-b951-d872f2087c98
* Give classes with virtual methods virtual protected d'tors instead of ↵jamesr@chromium.org2009-12-162-2/+14
| | | | | | | | | | | | | | | | | | | | | non-virtual public implicit d'tors. Was originally: Replace public nonvirtual destructors in classes with virtual members with protected nonvirtual destructors where possible, and with public virtual destructors where destruction of a derived class occurs. (chrome/browser/[a-m]* only) (Part 4 of http://www.gotw.ca/publications/mill18.htm has a rationale for why public nonvirtual destructors in classes with virtual members is dangerous.) BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/201100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34634 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup; remove deprecate file_util function and some obsolete TODOs.estade@chromium.org2009-12-091-6/+1
| | | | | | Review URL: http://codereview.chromium.org/467030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34133 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Allow silent extension installations from the extensions gallery - ↵rafaelw@chromium.org2009-12-081-2/+2
| | | | | | | | | | | | | | | Part 1." Original CL: http://codereview.chromium.org/400018/show Looks like we're no longer hoping to get this approach into mstone4 release, so I'm unwinding this. BUG=27431 TBR=aa Review URL: http://codereview.chromium.org/467042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34025 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IsPrefRegistered function from PrefService API and fix the callers totony@chromium.org2009-12-071-2/+2
| | | | | | | | | | | | | | call FindPreference directly. BUG=None TEST=compiles and passes existing tests Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/460117/show Review URL: http://codereview.chromium.org/463044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34010 0039d316-1c4b-4281-b951-d872f2087c98
* Allow silent extension installations from the extensions gallery - Part 1.rafaelw@chromium.org2009-12-071-2/+2
| | | | | | | | | | | | | | | | In this episode we: -Create a new ChildProcess privilege (SILENT_INSTALL_EXTENSION) which is granted to the extension gallery pages. -Ensure that extension gallery pages are isolated into their own process which is never shared with other urls. Important: The SILENT_INSTALL_EXTENSION privilege is never granted any additional abilities in this patch, so this patch only has the effect of grouping gallery URLs into a separate process. In subsequent patch(es) we plan to (a) observe this new privilege and allow gallery urls to install extensions bypassing the normal prompts, (b) polish this UI flow [in particular, do not show the black "loading" dilaog, (c) check the id of the extension to be installed (from the crx) matches the expected id (from gallery url). BUG=27431 Review URL: http://codereview.chromium.org/400018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33952 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts r4177, reimplements a fix for bug 3417. Adding UpdateObservers to ↵avi@chromium.org2009-12-042-1/+3
| | | | | | | | | | | DownloadItem::Finished is wrong, as it causes a duplicate notification to fire when a download is complete. BUG=http://crbug.com/3417 TEST=bug does not regress Review URL: http://codereview.chromium.org/464043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33848 0039d316-1c4b-4281-b951-d872f2087c98
* Enable browser_tests: SavePageBrowserTest.FileNameFromPageTitle & ↵thomasvl@chromium.org2009-12-041-10/+0
| | | | | | | | | | SavePageBrowserTest.SaveHTMLOnly on the Mac. BUG=16322 TEST=waterfall stays green Review URL: http://codereview.chromium.org/463031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33830 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-137-12/+13
| | | | | | | | the really hard ones which will need actual review instead of rubber-stamping.) Review URL: http://codereview.chromium.org/386026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31932 0039d316-1c4b-4281-b951-d872f2087c98
* A large number of style nits in preparation for turning on automated cpplint.py.erg@google.com2009-11-112-2/+3
| | | | | | Review URL: http://codereview.chromium.org/385023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31669 0039d316-1c4b-4281-b951-d872f2087c98
* Mark all tests in the DownloadTest suite as flaky under Windows (as ↵rolandsteiner@chromium.org2009-11-101-5/+19
| | | | | | | | | | | | | | | discussed in this review). As discussed under http://codereview.chromium.org/342056 . Note: did not change that ContentDisposition test, which was already marked as FLAKY for all platforms, nor KnownSize, which is DISABLED. BUG=20809 TEST=none Review URL: http://codereview.chromium.org/342056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31549 0039d316-1c4b-4281-b951-d872f2087c98
* Basic wiring to enable downloads for CF's host browser network stack. A ↵tommi@chromium.org2009-11-073-0/+13
| | | | | | | | notable change here is that url automation job id's no longer exist and instead a request id is used. There's a 1 to 1 relation between a job and a request so this is more convenient. Review URL: http://codereview.chromium.org/355036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31363 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert r31175 r31176 r31187"hclam@chromium.org2009-11-065-6/+19
| | | | | | | | | | | | The bustage seems to be a WebKit change upstream. It is not reverted in WebKit and merger. So bring the innocent change back in. TBR=jam TEST=green tree Review URL: http://codereview.chromium.org/375009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31214 0039d316-1c4b-4281-b951-d872f2087c98
* Rever r31175 r31176 r31187hclam@chromium.org2009-11-065-19/+6
| | | | | | | | | | | XP tests are failing, the guess is r31175 and r31176. TBR=beng TEST=XP tests go green Review URL: http://codereview.chromium.org/376008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31201 0039d316-1c4b-4281-b951-d872f2087c98
* If the download manager setting "prompt for a location for each downloaded ↵aa@chromium.org2009-11-061-3/+3
| | | | | | | | | | | | | file" is set, we weren't installing user scripts. It probably makes sense to check the ".user.js" on the URL always, instead of the path, since that is really what is supposed to happen conceptually. BUG=26801 TEST=Set settings to always prompt for download location. Install user script. Should get extension install prompt. Review URL: http://codereview.chromium.org/372006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31179 0039d316-1c4b-4281-b951-d872f2087c98
* Sixth patch in making destructors of refcounted objects private.jam@chromium.org2009-11-065-6/+19
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/370001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31176 0039d316-1c4b-4281-b951-d872f2087c98
* Enable localization of default downloaded filename.tony@chromium.org2009-11-042-3/+14
| | | | | | | | | | | | | | | Instead of localizing "download" string in net_util.cc, make a caller, download_manger, provide a localized string. BUG=25289 TEST=NetUtilTest.GetSuggestedFilename,DownloadManagerTest.TestDownloadFilename Original patch by hayato@google.com at: http://codereview.chromium.org/343014/show Review URL: http://codereview.chromium.org/367003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30971 0039d316-1c4b-4281-b951-d872f2087c98
* Add first class support for user scripts.aa@chromium.org2009-11-041-10/+34
| | | | | | | | | | | | Original review: http://codereview.chromium.org/340057 TBR=mpcomplete@chromium.org BUG=22103 TEST=Install a user script (such as from userscripts.org). You should get the extension install UI and the script should show up in the extension management UI. It should also work, though some scripts use Firefox-specific APIs and those won't work in Chromium. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30925 0039d316-1c4b-4281-b951-d872f2087c98
* Last patch in removing MessageLoop* caching.jam@chromium.org2009-11-033-25/+19
| | | | | | | BUG=25354 Review URL: http://codereview.chromium.org/353015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30881 0039d316-1c4b-4281-b951-d872f2087c98
* Fourth patch in getting rid of caching MessageLoop pointers.jam@chromium.org2009-11-025-225/+147
| | | | | | | BUG=25354 Review URL: http://codereview.chromium.org/348037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30751 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up temp scaffolding stubs some. It can be mac only now.estade@chromium.org2009-11-021-2/+0
| | | | | | | | BUG=9295,8077 TEST=trybots Review URL: http://codereview.chromium.org/340052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30714 0039d316-1c4b-4281-b951-d872f2087c98
* Disable DownloadTest.PerWindowShelf because of flakiness.mirandac@chromium.org2009-10-301-1/+2
| | | | | | | | | BUG= http://crbug.com/26325 TEST= none Review URL: http://codereview.chromium.org/348024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30590 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of MessageLoop* caching in extensions code.jam@chromium.org2009-10-301-1/+0
| | | | | | | BUG=25354 Review URL: http://codereview.chromium.org/345023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30550 0039d316-1c4b-4281-b951-d872f2087c98
* Unflaky tests.thakis@chromium.org2009-10-291-4/+2
| | | | | | | | | | | Since bug 24721 is fixed, these might work again. They don't show up on the flakiness dashboard, suggesting that they behaved for a while. BUG=24632,24889 TEST=Tests not super flaky Review URL: http://codereview.chromium.org/345024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30532 0039d316-1c4b-4281-b951-d872f2087c98
* First of several patches to get rid of MessageLoop caching now that we have ↵jam@chromium.org2009-10-282-84/+64
| | | | | | | | | ChromeThread::PostTask. BUG=25354 Review URL: http://codereview.chromium.org/342020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30383 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for bug 10876 that resulted in some refactoring:rolandsteiner@chromium.org2009-10-284-40/+58
| | | | | | | | | | | | | | | | | | | | | The bug originates from extensions being treated case sensitive on Windows and Mac OSX, where they shouldn't be. Therefore I added generic static methods to FilePath to compare strings in the same way the file system does, and changed the relevant parts of the code to make use of them. I tested the methods under Windows and Mac OS X. I also wrote a basic version for Linux/Posix that behaves the same way as the original code, so there should at least be no regression. Also, while fixing this I found some confusion in the code about whether extensions are used with or without leading dot. For this reason I changed some functions that were taking an extension as parameter to instead take the whole file path. This makes calling these functions easier and the caller doesn't need to know whether the extension is supposed to be with or without dot. In the same vein, I split DownloadManager::IsExecutable into IsExecutableFile, where one again passes in the whole file and doesn't have to worry about getting the extension right, and IsExecutableExtension, which corresponds to the original functionality. Ideally only the former method should be public, but that again would have required further code scrubbing that was (even more) outside of the original bug fix. Finally, fixed a wrong comment in the file path tests. BUG=10876 TEST=FilePathTest.MatchesExtension, .CompareIgnoreCase Review URL: http://codereview.chromium.org/149796 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30323 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 30168 - Commit patch set from http://codereview.chromium.org/149796rolandsteiner@chromium.org2009-10-274-58/+40
| | | | | | | | | | | | | (see discussion and history there) BUG=10876 TEST=FilePathTest.MatchesExtension.CompareIgnoreCase TBR=rolandsteiner@chromium.org Review URL: http://codereview.chromium.org/337042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30170 0039d316-1c4b-4281-b951-d872f2087c98
* Commit patch set from http://codereview.chromium.org/149796rolandsteiner@chromium.org2009-10-274-40/+58
| | | | | | | | | | (see discussion and history there) BUG=10876 TEST=FilePathTest.MatchesExtension.CompareIgnoreCase git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30168 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify threading in browser thread by making only ChromeThread deal with ↵jam@chromium.org2009-10-273-52/+43
| | | | | | | | different thread lifetimes.The rest of the code doesn't get MessageLoop pointers since they're not thread-safe and instead just call PostTask on ChromeThread. If the target thread is not alive, then the task is simply deleted.In a followup change, I'll remove any remaining MessageLoop* caching. With this change, there's little to be gained by caching since no locks are involved if the target MessageLoop is guaranteed to outlive the current thread (inferred automatically by the order of the chrome_threads_ array).BUG=25354 Review URL: http://codereview.chromium.org/306032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30163 0039d316-1c4b-4281-b951-d872f2087c98
* Move initialization of ChromeURLRequestContexts to the IO thread.eroman@chromium.org2009-10-238-35/+53
| | | | | | | | | | | | | | | | | | | | | | | Before, these URLRequestContexts were lazily created from the UI thread. Unfortunately that model made it easy for consumers on the UI thread to poke at stuff which was being used from the IO thread, and introduce races. So instead of providing a URLRequestContext*, the Profile now vends a URLRequestContextGetter*. The consequence of this is: * Consumers on the UI thread can no longer get access to a URLRequestContext. * Consumers on the IO thread need to call URLRequestContextGetter::GetURLRequestContext() to get at the context. This uses the same style lazy-creation of URLRequestContexts, albeit from the IO thread. OK, so now the smelly part: There were a couple of consumers of URLRequestContext on the UI thread that can't easily be moved to the IO thread -- these are the consumers of the cookie store. Before they could happily mess with the cookie store from the UI thread, and this was fine since CookieStore is threadsafe. However under the new model, they have no way to get at the URLRequestContext from the UI thread, hence can't get a pointer to the cookie store. To support that use-cases, I bastardized the API some by adding a URLRequestContextGetter::GetCookieStore() method that lets UI thread consumers get a pointer to the cookie store, since we know this particular cross-thread usage is safe. BUG=http://crbug.com/22294 Review URL: http://codereview.chromium.org/258008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29880 0039d316-1c4b-4281-b951-d872f2087c98
* Disable system suspend while downloading files on win32.mark@chromium.org2009-10-232-1/+6
| | | | | | | | | | | | | | | | | | | | If the system goes into power-save sleep mode while downloading files, the download fails. So, prevent sleep mode until the download finishes. This patch introduces a new RAII class to request that the system's power-save mode be disabled - PowerSaveBlocker. This is only implemented for win32; other platforms are stubbed out. This only partially implements bug 25420 it only attempts to handle the downloading case. Patch by Bryan Donlan <bdonlan@gmail.com> BUG=25420 TEST=Download a large file with the system sleep timeout set to a short interval. Review URL: http://codereview.chromium.org/287017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29873 0039d316-1c4b-4281-b951-d872f2087c98
* Do some cleanup of file path name handling.brettw@chromium.org2009-10-222-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This started trying to cleanup DownloadManager::GenerateFilename which asserts if your system locale isn't UTF-8 (I ran into this when mine got messed up). The solution is to have GetSuggestedFilename return a FilePath rather than calling FromWStringHack. The rest of the patch is a result of trying to write GetSuggestedFilename in a reasonable way. I changed ReplaceIllegalCharacters to work on a FilePath::StringType. Some places in the code calling these functions got cleaner, some got messier. I think overall the ones that got messier are the ones doing sketchy things with paths and the ones that got cleaner are the ones doing things more properly. The only code here that gets called a nontrivial number of times is the weburlloader, and I think the new code does about the same number of string conversions overall (though on certain platforms the number will be higher or lower). BUG=none TEST=none Review URL: http://codereview.chromium.org/271056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29832 0039d316-1c4b-4281-b951-d872f2087c98
* A few more #ifdefs for platform-specific behaviors to port this test to mac.mark@chromium.org2009-10-221-52/+79
| | | | | | | | | | | Haven't tested outside of mac yet, so the guard for GetSafeFilename is still present for linux. Trybot should be run to make sure it passed in Win. BUG=21632 TEST=none Review URL: http://codereview.chromium.org/296001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29797 0039d316-1c4b-4281-b951-d872f2087c98