File browser access to Chrome's sandboxed filesystems - html

I'm writing a Google Chrome app that stores things locally with the HTML5 FileSystem API. Is there any way to use Windows Explorer to get to the directory where Chrome stores these files or is it entirely virtual and inaccessible from outside the app? I haven't been able to find the directory by poking around nor have I seen any reference online to it.
I suppose I could just write something within the app to allow me GUI management of the files my app stores or just use the developer console, but it would really be a time saver to use WE.

Nevermind, I just found it. For anyone looking, it's in (on my windows 7 machine at least)
C:\Users\ user \AppData\Local\Google\Chrome\User Data\Default\File System
Also note that this was in Chrome 11, in Chrome 13 there were some changes to the FileSystem (probably for security) that make it very difficult to find specific files by scrolling through the files in Chrome's AppData space.

Related

How to save a chrome extension as .exe file?

I have implemented a chrome extension project but I need to install it by running a .exe file.
I tried many ways like extracting files to C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\Extensions automatically using iExpress(i gave the id of extension to the folder),
i tried creating ExtensionInstallForceList under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Chrome\ and creating new string value "1" giving it value "id;https://clients2.google.com/service/update2/crx"
and lots of other ways but still I couldn't make it. I would appreciate a little help
The only programmatic way to install an extension on Windows (assuming you're not a Windows Domain sysadmin, which seems to be a safe assumption) is as follows:
Upload your extension to Chrome Web Store and publish.
This is mandatory, but the extension can be specified to be unlisted.
Create an installer that adds a registry entry as described here.
Upon next browser restart, Chrome will:
Download the extension from Web Store (and nowhere else)
Ask a confirmation from the user to allow that extension.
If the user agrees, you're done. If the user does not agree, the extension is blacklisted and you can't try again on this install unless the user installs directly from Web Store.
ExtensionInstallForceList is only for enterprise deployments via group policy. Chrome will ignore local registry values and query the domain policy directly.

What is the easiest way to find Chrome extension's id in a setup application?

I need to setup a native application which talks to a Chrome extension.
For that I am creating a setup, but I need the extension's id to be added in the native application's manifest file. That id says which extensions are allowed to talk with that native application.
How to get the extension id, assuming the user manually installs the extension by dragging and dropping.
Btw, To my knowledge installing an external chrome extension (no chrome web store) silently is close to impossible. I highly appreciate if someone has any solution for that, too.
The recommended flow would be to keep the extension in the Web Store (possibly unlisted if it does not work without the module), silently queue it for installation using the registry or other platform-specific method, and then warn the user to accept the install in the dialog on next browser restart. This is as close to "silent" as it gets.
If you absolutely have to distribute the extension externally (and drag&drop install will probably not work), you can pin the ID by setting the "key" field in the manifest. See this question for ways of doing so.

Access website localstorage data from a Chrome Packaged App

I'm building a packaged app that's meant to interact with a website I wrote to get its localStorage data and send it to other devices using bluetooth. This seems like it would be easy with an extension, however with an extension I would not have access to chrome's bluetooth API. I'm not sure this is even possible, but if it is, how would I go about accessing and communicating with the website using the packaged app?
The answer is that you can't. The two local storage repositories are distinct ("sandboxed"), and one can't access the other.
If this website wants to make data available to any other website, or to a Chrome App, it should put it someplace on the server, accessible via a URL, and then the Chrome App can easily access it. But, there's no way to effect such sharing with the data on the client.
Two Chrome Apps can share data locally, because they can access the local file system. However, web apps (HTML/JavaScript loaded from a server) can't access the local file system, only a sandboxed file system.

How to access system resources in Chrome Extensions

I am developing a chrome extension which needs to fetch some configuration from a system file... Earlier chrome provided NPAPI plug-ins, which could access any system resource (win registry, file system, IPC calls etc...)
However knowing that NPAPI will be discontinued soon, i am looking for alternatives.. one of the ways to build a plug-in is using Pepper clients, but pepper clients read/write only to chrome local storage.. which looks like a more data version of cookies...
So is there any other alternative to access system resources (like registry, files etc) in chrome extensions now??
The suggested alternative to NPAPI for many cases is "Native Messaging", where you provide an installer to users which adds binary code that chrome can communicate with via message passing. See http://developer.chrome.com/extensions/messaging.html#native-messaging.
For file access, in packaged apps there is the fileSystem API that lets you get access to the actual (non-sandboxed) filesystem. See http://developer.chrome.com/apps/fileSystem.html.

FireBug in Chrome doesn't show up on local websites

When I right-click on the local html page and select "Inspect with FireBug Lite" nothing happens... on regular online sites it works except for "https://chrome.google.com/webstore/category/apps"
anyone had the same experience? I have the latest version of the extension (but it's from 2011 :/)
UPDATE: on some local sites it does show! on two web apps (PHP, Rails) it did work, but on a few static HTML files I tried it didn't....
Apparently this is normal...:
It doesn't work on local pages
If by "local pages" you mean files accessed via "file:///" protocol then yes, Firebug Lite doesn't work with "file:///" protocol. This is a JavaScript security restriction to prevent malicious web pages from accessing files in your your machine. Also, please note that the while you can load a "local page" in the browser (it will render properly) it will NOT behave exactly the same as when hosted in a web server.
Solution:
You can solve this problem by loading your page in a web server installed in your machine, so you can access that local files through "http://" addresses. This is the best solution: it is safer, and you'll get the most of what Firebug Lite can give you. I recommend using Apache HTTP Server, but you can use anyone (like IIS for example).
Which exact URL are you visiting? It is an internal Chrome's page
(like "chrome://downloads/"), or some page related to Google Chrome
extensions "https://chrome.google.com/extensions/")?
Google Chrome won't allow content scripts (required by Firebug Lite)
running on such pages. The problem is that Chrome does not inform the
user and neither the extension about it. In other words, there is no way
to Firebug Lite know if the content script was loaded or not, and we
worked around this by sniffing the URL and detecting when you visit
URLs that begins with "chrome://" or "https://chrome.google.com/extensions/",
alerting users in such cases.
You've few options to fix the solution.
One is to use Mozilla Firefox.
Second, install a web server on your system. Try WAMP or XAMPP. Once installed, store all the web pages in the root folder of the web server you just created. Save all the web pages and html files in C:\xampp\htdocs. Navigate to the locally stored webpages using your web browser by going to “127.0.0.1/index.html” or “localhost/index.html”.
Now you can use Firebug-Lite for Google Chrome on local files.