Follow me on Twitter for my latest adventures!

As everyone already knows, Google released a new open-source web browser called Chrome.
Having interest in code reuse, I downloaded the source code and examined all the open-source libraries used.
Google Chrome browser shows excellent example of code reuse. I found that they use at least 25 different software libraries!
Here is the full list of libraries, along with relative paths to source code and short library descriptions. Many of the libraries have been patched by googlers; look for README.google files in each library directory for information about changes.
Library |
Relative Path |
Description |
|---|---|---|
An open-source multi-platform crash reporting system. |
||
/src/googleurl |
A small library for parsing and canonicalizing URLs. |
|
Skia |
Vector graphics engine. |
|
/src/v8 |
Google's open source JavaScript engine. V8 implements ECMAScript as specified in ECMA-262, 3rd edition, and runs on Windows XP and Vista, Mac OS X 10.5 (Leopard), and Linux systems that use IA-32 or ARM processors. V8 can run standalone, or can be embedded into any C++ application. |
|
Open source web browser engine. |
||
Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions. |
||
Network Security Services (NSS) is a set of libraries designed to support cross-platform development of security-enabled client and server applications. Applications built with NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards. |
||
Spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or character encoding. |
||
C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more. |
||
/src/testing/gtest |
Google's framework for writing C++ tests on a variety of platforms (Linux, Mac OS X, Windows, Windows CE, and Symbian). Based on the xUnit architecture. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, various options for running the tests, and XML test report generation. |
|
bsdiff and bspatch are tools for building and applying patches to binary files. |
||
bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. |
||
/src/third_party/icu38 |
ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. |
|
Library for handling the JPEG (JFIF) image format. |
||
PNG image format library. It supports almost all PNG features, is extensible, and has been extensively tested for over 13 years. |
||
XML C parsing library. |
||
XSLT C library. |
||
LZMA is the default and general compression method of 7z format in the 7-Zip program. |
||
A collection of high performance c-string transformations (in this case, base 64 encoding/decoding), frequently 2x faster than standard implementations (if they exist at all). |
||
Cross-platform plugin architecture used by many web browsers. |
||
Application programming interface (API) for writing multithreaded applications |
||
Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. |
||
Software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. |
||
Free Python library that implements SSL 3.0, TLS 1.0, and TLS 1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs in addition to X.509 certificates. Note: Python is not a part of Chrome. It's used for testing various parts of Chrome browser, such as code coverage, dependencies, measures page load times, compares generated html, etc. |
||
zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system. |
They have done a really good job making these libraries work together. As someone said, "good coders code, great reuse."
I also found some other exciting things in the source, which I will soon post about. I recommend that you subscribe to my rss feed, if you are interested!
Talking about Chrome, I am waiting for Google to add capability to write extensions for their browser! I already made a list of extensions that I will try to create as soon as they add this feature.


Facebook
more
LinkedIn
Google+
GitHub

Comments
Excellent collection of data.
Inspiring too. Yep, that guy said it well when he said "Good coders code, great reuse!" :)
Just curious, who said it?
You have listed Netscape Portable Runtime (NSPR) twice, once at 6 and again at 8.
Srikanth, I don't know who said that! I just remember that I read somewhere "good coders code, great reuse" and it stuck in my memory. When I created my blog, I tried searching for the article but could not find it anymore!
Peter, thanks, I corrected that mistake.
I found several other libraries too in code.
Dont know, if they are used directly or required by other tools/libs.
Not sure why you did not mention them.
bsdiff
bspatch
lighttpd
pthread
cygwin
Vipsy, I surely did mention bsdiff, bspatch and pthread! I did not mention cygwin and lighttpd as they are not libraries...
My Bad..
I did not read it thoroughly.
"Windows Template Library" links to hunspell.
Grrr, oops, this is what happens when copying and pasting pieces of html code repeatedly... Corrected now! Thanks!
Umm, but they just copied the libraries inside their own tree? That's good?
v, the licenses of the libraries they used allowed Google to include them in their source tree!
s/scr/src/g
me, hehe, collaborative mistake correction is going on here. Thanks, I s/scr/src/g'ed.
Excellent blog post!!
Do you see anywhere in the code where Google collects browsing habits of the user?
hi there,
I look forward to your list of plugins you want to develop for Google Chrome.
BR,
~A
http://code.google.com/chromium/terms.html
Thanks for your comment, Dmitry. I did know about this page before I posted... Only later did I find out it existed (from reddit comments)!
I played with Chrome all day yesterday and my conclusion is that FireFox3 kicks Chrome to the curb!
Jeff
[spammy url removed]
Good one
Great read.
um...hows this reuse different from most other FOSS projects? Or is this another one of those "hey look at what everyone already knows" blogs
jon, you are welcome to see if it is one of the "what everyone knows blogs" by browsing around a little!
A Python library, but no libpython? How does that work? Do they compile it to their JS VM's bytecode?
An add-op API was the first thing I was looking for and I was pretty disappointed to find none. I hope this was at least taken into account during their design otherwise I don't think it will be easy to come up with a good add-on API and framework later. There are some concerns with their EULA too...
300 baud, I should have been more precise in my post. They use a lot of Python for testing various parts of Chrome, such as code coverage, dependencies, measures page load times, compares generated html, etc. I am updating the post now
I guess I should have figured out that the build time required python by the presence of scons. Was just hoping there was a python interpreter buried in the browser someplace.
You list "gzip2", but I think you meant bzip2...
Does skia mean it handles svg natively?
I think you are just stroking Google's ego. Many applications written for Linux use most of these libs. Rather, you might as well change your article's title to "Google Chrome Browser uses many libraries".
Adam, I have not yet examined skia that closely, as it seems that it was first released just with Chrome. I will look into it in the next few days.
Thanks for noticing the mistake, i corrected that!
Talent imitates, but genius steals. - T.S. Elliott.
Wow, very nice summary of the programming aspect of Chrome. Wonder why lighttpd is being used?
I really like the huge techie/blogger reaction that Google Chrome has caused. Everyone is tinkering and reviewing it.
That's along the lines of "Good designers borrow; great designers steal."
The quote is, "Good composers borrow, great composers steal." It's attributed to Igor Stravinsky. Stravinsky, true to his word, stole the phrase from T.S. Eliot, who wrote, "Good poets borrow, great poets steal." Or perhaps from Pablo Picasso, who is reported to have said, "Good artists copy, great artists steal."
You folks are missing the point. The original (and unsourced) quote attributed to Picaso has lost its meaning in the translation. When he said "good artists copy, great artists steal" it was saying that good artists make a copy of the subject as they see it, but a great artist takes the subject and makes it their own through their own interpretation, enhancements, etc. To reuse a library is simply to borrow, and is naught but a nod toward expedience. Taking those libraries and improving on them or using them in a synergistic way that goes beyond their original purpose, that would be great artistry.
hello.
in there,chrome tips and tricks collections.
http://eurekatips.com/2008/09/10/google-chrome-tips-and-tricks-collections/
Chrome Browser very good Browser,
i like it,
Thanks for make it.
i keep learning about more and more little advantages and features with Chrome, with privacy, for example; now if only they would take care of it's cookie management glitches...
it's funny, the more i use Chrome (for windows), the more unstable it seems to get... crashes a lot more, can't handle sites with flash, hangs every time i close a tab... all that to say, i'm switching back to Firefox
I keep reading Good Artist... Talent imitates... and stealing. I see that Chrome, although it hasn't replace firefox... yet, has some great potential. But I think it's also created with a conscience, you cannot steal what is given away freely.
They're using Mozilla's code which they're using against them actually because Chrome will take over Mozilla's market once it's fully developed.
Peter, How can I miss this famous post; really a great collection of data. Thanks mate.
Chrome Browser very good Browser,
i like it!!!
Axel
Yes, code reuse is great when you know the code (so you can assure its good code) or when it comes from Google (haha just kidding)!
Nice set of toolkits at the Chrome browser! C++ is beautiful
i want to change the chache directory of chrome using c/c++. i will be gratefull if anyone help me with code.
ya " Nice set of toolkits at the Chrome browser! C++ is beautiful "
thanku man thanks to google
Well, technically, Google chrome *isn't* performing code reuse. It both is and it isn't.
Googles 'reuse' is right on par ( as far as linux is concerned at least ) with people copy-pasting code all over their program, and this really is poor.
I downloaded the source a while back when it first came out and discovered lots of the libraries included with it, but this is *not* the way to do things.
At that stage the backend was alleged to compile, but their methodology was completely back to front. Their build system mostly entails rebuilding all those libraries they bundled in with chrome, albeit with their special build system, with their special patches to these libraries.
And this is something most windows centric devs just don't understand, because they don't have much of a concept of shared libraries and what they bring to the party.
Building google-special versions of dozens of libraries does nothing but send opensource development backwards, because it increases the number of copies of libraries with the exact same name, and the exact same purpose on your system needlessly, which both 1) wastes lots of build time 2) wastes disk space, 3) wastes memory with the multiple copies of libraries in ram 4) reduces security by not working with the *existing* system libraries which are tailored to the system.
Granted on windows you're not likely to have all the dependencies needed to make it tick, but there's no good reason to bundle these in chromes source.
They should be installed separately, possibly as a bundle, and built against the sources, that are provided pristine from upstream, and if something in a library is not to your liking, report a bug, get it fixed, and help the rest of us out instead of just going out and doing things different in progressively backwards and unmaintainable ways.
We people on Linux have solved the issue of 3rd party libraries years ago, so just put in dependences and let the distros install them and then use those.
sorry, can't continue line of thought, distractions broke the rant, so it may lose coherence near the end.
Chrome Browser very good Browser,
i like it!!!
Chrome Browser very good Browser,
i like it!!!
ya ” Nice set of toolkits at the Chrome browser! C++ is beautiful ”
thanku man thanks to google
Yeah, I read about it a while ago. Still, Chrome rocks!
David
@Kent Fredric:
Great comment! I understand your point, what google just did is they made a rod for their own back. If some serious bug will be discovered in those libraries, or some great advancments will be done, they will have two incompatible versions, and they will have to do much on their own to fix or change the library.
Thanks for posting all of this!
Thanks for posting all of this source code, very helpful! :-)
Understand your point, what google just did is they made a rod for their own back.
The last three comments on this comment are utterly bizarre.
Anyways, thanks for the article, I didn't understand what your title quote meant until now. :)
want to edit code of chrome about CSP & Same Origin Policy how to find those file-no where mentioned which function is where
I could not find proper documentation which explains it clearly
now I am playing guessing game and even I look at the Content security policy code how would I know that I am reading that.
How close is this post to the current chromium (2017)?
Leave a new comment