summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
Commit message (Collapse)AuthorAgeFilesLines
* Avoid disk IO in SavePackage on the UI thread. Also cleaned up the code a bit.jam@chromium.org2010-11-051-118/+57
| | | | | | | BUG=61775 Review URL: http://codereview.chromium.org/4478002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65249 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on file access checks on Win.jam@chromium.org2010-11-041-0/+9
| | | | | | | | | 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-9/+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/+9
| | | | | | | 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
* Fix save file stuff to use scoped_refptr for refcounted params.willchan@chromium.org2010-10-251-2/+1
| | | | | | | | | BUG=28083 TEST=existing Review URL: http://codereview.chromium.org/3966007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63748 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitString functions into the base namespace and update the callers.tfarina@chromium.org2010-10-141-1/+1
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part18:tfarina@chromium.org2010-10-111-1/+1
| | | | | | | | | | | | - Include browser_thread.h instead of chrome_thread.h in files under dom_ui and download. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3700002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62206 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ChromeThread to BrowserThread Part10:tfarina@chromium.org2010-10-091-23/+23
| | | | | | | | | | | - Rename entries under download and extensions. BUG=56926 TEST=trybots Review URL: http://codereview.chromium.org/3685001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62081 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61899 for breaking cookes on file:// URLs.willchan@chromium.org2010-10-081-1/+2
| | | | | | | | | | | | | | | | | | BUG=58553 ================================================= Fix instances of passing raw pointers to RefCounted objects in tasks. Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3654001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62043 0039d316-1c4b-4281-b951-d872f2087c98
* Fix instances of passing raw pointers to RefCounted objects in tasks.willchan@chromium.org2010-10-081-2/+1
| | | | | | | | | | | Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61899 0039d316-1c4b-4281-b951-d872f2087c98
* Added a check to see if the SaveFileDefaultDirectory exists, if not it uses ↵tony@chromium.org2010-10-011-18/+35
| | | | | | | | | | | | | the DownloadDefaultDirectory instead. Contributed by pnettleship@gmail.com BUG=47561 TEST=Create folder, save html page into folder, delete folder, resave page. If the deleted folder is not re-created automatically, and you are defaulting to the default download di then it worked. Review URL: http://codereview.chromium.org/3449022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61214 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak of a DownloadItem in SavePackage::Init.phajdan.jr@chromium.org2010-09-241-2/+10
| | | | | | | | | BUG=56495, 54149 TEST=valgrind, see bugs Review URL: http://codereview.chromium.org/3498002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60439 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-241-0/+1
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* Regression fix: keep the download shelf visible when multiple sites are saved.phajdan.jr@chromium.org2010-09-211-8/+3
| | | | | | | | | BUG=54149 TEST=see bug Review URL: http://codereview.chromium.org/3442003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60034 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: download cleanup, rename things to be more accurate.phajdan.jr@chromium.org2010-09-101-3/+3
| | | | | | | | | | | Also, moved some code closer to the object it's operating on. BUG=48913 TEST=unit_tests, ui_tests, browser_tests Review URL: http://codereview.chromium.org/3341013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59156 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Extract all preferences-related code from DownloadManager to ↵phajdan.jr@chromium.org2010-08-301-0/+1
| | | | | | | | | | | DownloadPrefs. TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/3226010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57916 0039d316-1c4b-4281-b951-d872f2087c98
* Move prefs-related files under chrome/browser/ into a prefs/ subdir.evan@chromium.org2010-08-261-1/+1
| | | | | | | | | | | | Rename includes, resort header include order in places where the rename changed the order. BUG=50548 TEST=compiles Review URL: http://codereview.chromium.org/3203008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57434 0039d316-1c4b-4281-b951-d872f2087c98
* Fix suggested save file name for title-less pages.estade@chromium.org2010-08-131-35/+34
| | | | | | | | | | | regressed in r48691 BUG=51963 TEST=TODO Review URL: http://codereview.chromium.org/3150012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56091 0039d316-1c4b-4281-b951-d872f2087c98
* Convert occurrences of WideToUTF{8,16}(l10n_util::GetString...() ...viettrungluu@chromium.org2010-08-081-2/+2
| | | | | | | | | | | ... to l10n::GetString...UTF{8,16}(). BUG=23581 TEST=builds and tests pass Review URL: http://codereview.chromium.org/3054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55371 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up download code:phajdan.jr@chromium.org2010-08-051-4/+3
| | | | | | | | | | | | | | | | | | - move filename generation parts and related code out of DownloadManager download_util is not the best place for it, but it's better than DownloadManager which we're trying to minimize - clean up posting tasks to different threads. There's no need to create separate methods for that, it was cluttering the file needlessly - other minor cleanups, like using static_cast instead of C-style cast TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/3043048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55088 0039d316-1c4b-4281-b951-d872f2087c98
* Download code cleanup:phajdan.jr@chromium.org2010-07-271-4/+3
| | | | | | | | | | | | | | - make the code more object-oriented, make the object expose less accessors - make some parts of code look more obvious, use existing helpers - make the public interfaces slightly better (less ctor parameters) - make some names slightly better TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/3029025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53808 0039d316-1c4b-4281-b951-d872f2087c98
* Download code cleanup: split big files into smaller one.phajdan.jr@chromium.org2010-07-161-0/+1
| | | | | | | | | | | | | It's hard to find things in the download directory. DownloadFile and DownloadFileManager were bundled together. Similarly for DownloadItem and DownloadManager, which was much less intuitive. Some 3-5 line structs were also in one bag with something else. I extracted them to their own small file. TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/2806054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52749 0039d316-1c4b-4281-b951-d872f2087c98
* Download code cleanup:phajdan.jr@chromium.org2010-07-141-34/+52
| | | | | | | | | | | | | | | - convert some private static members to anonymous functions - move some methods from public to private This should make the interface of some download classes smaller, and hopefully easier to understand. BUG=48913 TEST=unit_tests, browser_tests, ui_tests Review URL: http://codereview.chromium.org/2974007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52327 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate most of the remaining wstring file_util functions.evan@chromium.org2010-07-081-1/+3
| | | | | | | | | | | | | These still exist on Windows due to being used by the installer, but by moving them into the Windows-only block we prevent them from being used in new code. (I am already finding new code using some of these! I am glad to be rid of them.) BUG=24672 Review URL: http://codereview.chromium.org/2850042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
* Change a bunch of string types.estade@chromium.org2010-06-291-2/+8
| | | | | | | | | | | | | Started out just trying to change PrefService::GetString and ::SetString. This snowballed a little bit. Had to change a bunch of url strings in search_engines/ from wstring to string (some of them may be better off as GURLs, but UTF-8 is a step in the right direction, since that's what GURL uses internally, as well as externally via its setters/getters). TODO (later patch): things that ask for accepted languages should use std::string, not std::wstring. BUG=none TEST=try bots Review URL: http://codereview.chromium.org/2854015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51157 0039d316-1c4b-4281-b951-d872f2087c98
* Disallow apps with the wrong content type header.skerner@chromium.org2010-06-251-1/+1
| | | | | | | | | BUG=41290 TEST=manual Review URL: http://codereview.chromium.org/2830017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50855 0039d316-1c4b-4281-b951-d872f2087c98
* Don't save last used locations in open and save dialogs when in incognito mode.bauerb@chromium.org2010-06-091-1/+2
| | | | | | | | | | | | | | For "Save page as..." we simply don't store the save location in incognito mode. For "Open File"... and file upload controls, it's a bit more complicated: because NSOpenPanel and NSSavePanel default to using the last chosen directory from NavigationServices (which we can't influence), we provide a preference value prefs::kLastChosenDirectory as fallback there, which is not persisted in incognito mode. BUG=45064 TEST=See bug for manual test. Review URL: http://codereview.chromium.org/2450004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49237 0039d316-1c4b-4281-b951-d872f2087c98
* Moved URLFetcher and related classes to chrome/common/net.sanjeevr@chromium.org2010-05-071-1/+1
| | | | | | | | BUG=None TEST=Build and Unittests Review URL: http://codereview.chromium.org/1995008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46739 0039d316-1c4b-4281-b951-d872f2087c98
* Changing linux platform for chromeos. This involved moving platform_util ↵dhg@chromium.org2010-04-291-1/+1
| | | | | | | | | | and extension_error_reporter to browser, so that the UIs surrounding them can be in the browser. BUG=none TEST=none Review URL: http://codereview.chromium.org/1705009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45986 0039d316-1c4b-4281-b951-d872f2087c98
* Fix save complete web page crasherestade@chromium.org2010-04-261-1/+8
| | | | | | | | | | | | | Repeatedly saving a page may cause a crash. See the bug for a full discussion. This fixes that by making sure the curretn SavePackage is the same one that called into SaveFileManager::RenameAllFiles. One more hack on the giant, teetering pile of hacks that is the SavePackage system. Can't hurt, right? BUG=42454 TEST=see bug Review URL: http://codereview.chromium.org/1729016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45599 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of more calls to FromWStringHack.tony@chromium.org2010-04-261-9/+6
| | | | | | | | | | | BUG=24672 TEST=compiles Patch from Thiago Farina <thiago.farina@gmail.com> Review URL: http://codereview.chromium.org/1750013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45568 0039d316-1c4b-4281-b951-d872f2087c98
* Browser and unit test cases for patch submitted for Issue 23584 undertony@chromium.org2010-04-081-11/+17
| | | | | | | | | | | | | | http://codereview.chromium.org/660264. BUG=23584 TEST=covered by unit tests and browser tests Original patch by Chamal De Silva <chamal.desilva@gmail.com> at http://codereview.chromium.org/669262/show Review URL: http://codereview.chromium.org/1562017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43934 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 6: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-081-1/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/671025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40964 0039d316-1c4b-4281-b951-d872f2087c98
* Modified SavePackage(TabContents* tab_contents) of save_package.cc.tony@chromium.org2010-03-021-1/+9
| | | | | | | | | | | | | | | | | | Used the same fix provided for issue 12748. This is done to retrieve actual url of the web page displayed in tab instead of displayed url. Displayed url is different from actual url when viewing source of a web page. ex: view-source:http://www.google.lk/ This is the reason why chrome fails to save source of web page. BUG = 23584 TEST= Visit a web page. Right click and select "view page source". Right click and select Save as. Select web page complete in save dialog. Click save. Source is saved without being cancelled. Repeat the above steps, but select web page only instead of complete in save dialog. Source is saved without chrome getting crashed. Review URL: http://codereview.chromium.org/660264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40338 0039d316-1c4b-4281-b951-d872f2087c98
* This change makes incognito downloads show up in the downloads page of an ↵estade@chromium.org2010-02-241-2/+3
| | | | | | | | | | | | incognito window. These downloads are not persisted to history; hence they do not persist between incognito sessions. There is no special UI for the incognito downloads. That can be added later. BUG=28702 Review URL: http://codereview.chromium.org/650065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39910 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes Issue 34722: Meaningless value in 'Save as type' combobox of 'Save ↵georgey@chromium.org2010-02-231-3/+68
| | | | | | | | | | | | page as...' dialog Adds extension base don MIME type of the page. Adds capability of the complete save of the "application/xhtml+xml" pages BUG=34722 TEST=In the bug + try pages with other MIME types, such as "text/xml", "text/plain" or "text/css" Review URL: http://codereview.chromium.org/650176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39804 0039d316-1c4b-4281-b951-d872f2087c98
* Move pref_{member,service} and important_file_writer from chrome/commonphajdan.jr@chromium.org2010-02-191-1/+1
| | | | | | | | | | | | | to chrome/browser. This is a part of an effort to remove bad dependency of chrome/common on chrome/browser. TEST=unit_tests and ui_tests, just moving code BUG=none Review URL: http://codereview.chromium.org/621004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39428 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Reduce header dependencies in chrome.phajdan.jr@chromium.org2010-02-091-4/+4
| | | | | | | | | 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
* Support dragging a virtual file out of the browser.jianli@chromium.org2010-01-151-5/+5
| | | | | | | | | 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
* Handle extensions correctly when the default download location is not writablekinuko@chromium.org2009-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* 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
* Reverts r4177, reimplements a fix for bug 3417. Adding UpdateObservers to ↵avi@chromium.org2009-12-041-0/+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 localization of default downloaded filename.tony@chromium.org2009-11-041-2/+4
| | | | | | | | | | | | | | | 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
* Fourth patch in getting rid of caching MessageLoop pointers.jam@chromium.org2009-11-021-11/+22
| | | | | | | 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
* Move initialization of ChromeURLRequestContexts to the IO thread.eroman@chromium.org2009-10-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | 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
* Do some cleanup of file path name handling.brettw@chromium.org2009-10-221-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This patch enables "Save page as" (ctrl+s) for resources located atjamesr@chromium.org2009-10-131-4/+6
| | | | | | | | | | | | | | | | | | chrome-extension URLs. In the absence of any API for doing file I/O this adds very useful functionality to chrome extensions. This patch is needed to allow APU to save its instrumentation data to disk without the need for a plugin. patch by: Jaime Yap (jaimeyap@google.com) BUG=none TEST=Bundle a page "foo.html" with an extension. Usings the tabs API or window.open, open "foo.html" in the extensions process. Try to save it using CTRL+S. (You can test with any of the existing samples that bundle a page). Review URL: http://codereview.chromium.org/266051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28839 0039d316-1c4b-4281-b951-d872f2087c98
* Make on-demand download directory creation safe.estade@chromium.org2009-10-091-8/+36
| | | | | | | | | | | If the SavePackage or SaveFileManager went down at the wrong time (most likely during shutdown), we potentially could have crashed. Avoid this race by using a specialized Task instaed of SaveFileManager, and by making the SavePackage callback task scoped. BUG=none TEST=downloads still work, whether or not the downloads dir exists. Review URL: http://codereview.chromium.org/262019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28511 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98