Chrome on Mac

The March video walk-through reveals that the look and feel of the browser is distinct and instantly identifiable as part of the Chrome project. At the same time, Chrome feels well integrated with OS X. Chrome Project Manager, Karen Gr?nberg, told Ars, "We are sensitive to all our platforms. We don't want to lose our Chrome features, but we will be respectful to the Macintosh platform. You can tell at first glance that this is the Chrome browser and at the same time, it feels like a native application."

Although many of the screen components feel chunkier than normal OS X choices, particularly in Google's use of fonts and icons, the window is clearly a Cocoa-based application and uses all the standard Cocoa elements, from menus to window buttons to scrollbars to resize handles. "Mac users are especially concerned with fit and finish," explained Senior Software Engineer Amanda Walker. "And we have paid particular attention to those details while integrating with the OS."

Focusing on usability has been a big part of the Chrome project. Google has performed usability studies on each of the target platforms, customizing each UI to ensure that it integrates well into the platform. But making the UI feel native isn't where platform integration ends.

Pinkerton told Ars that Chrome's integration with OS X goes deep. When designing Chrome, it was Pinkerton's role to make sure that the application's architecture would not exclude what the browser needed to do on any of its target platforms, while at the same time leveraging as many native capabilities as possible. "We wanted to do as much as possible to work with native services, from threading and the Mach layer through working with the native keychain and with PDFkit. We wanted it to feel like a real Macintosh application, from using stored passwords and the address book to Spotlight."

Webkit

Chrome is built on Webkit, an open source web browser engine that was originally developed by Apple by the KDE project and which helps power OS X's Safari on the Mac and the iPhone. Webkit is actively being used by Nokia, Torch Mobile, and the KDE project, since it provides a rendering system that has been ported to a variety of operating systems and hardware platforms.

Although Apple remains a major WebKit player, Google is an active participant in helping grow the project. The Chrome dev team tells us that they're in daily contact with WebKit project members, keeping in touch via Freenode's #webkit irc channel. "We're making changes that benefit all WebKit participants," Walker said, noting that open source projects depend on this kind of community effort. "Many of our updates are not Chromium-specific. Our longterm goal is to help make all WebKit projects better."

Security

Chrome surprised many people by outcompeting other browsers in the recent pwn2own competition at CanSecWest. In the first day of the competition, Chrome remained the only browser to fend off security exploits. "We were surprised to get as much attention as we did," Amanda Walker told Ars. "But it validated our architectural decisions, like sandboxing our renderer. We're not under any illusion that Chrome is immune from a security standpoint but this does vindicate some of the choices we made."

Engineering director Linus Upson added, "We had the luxury of designing for security from the very beginning. This let us build good defenses. Normally it takes more than one bug to create an exploit. By sandboxing, we could limit the number of bugs possible in each view."

The security team at Google considered possible attacks from the very beginning of their design. ChromeBot, which is used by Google, is a large scale virtual machine that accesses thousands of webpages to test for potential crashes. ChromeBot preemptively helps find those crashes and potential exploits, and allows the Google engineers to fix them before they go live.

Security technologies also depend on the kind of threat presented, and Google has been building a wide range of security features into Chrome. "Pwn2own is very different from much of what goes on in the wild," Upson told Ars. "For many users, it's more important to provide features like phishing protection and warn users about pages with exploits." These user-centric security features were designed into Chrome from the start.

Downloading Chromium

The Chromium open source project means that anyone who wants to take a peek into the project can do so. Admittedly, the committed versions lag behind the development versions, but it can be both instructive and exciting to sync to the repository and see where things stand. That's exactly what Ars did this week, in order to both test the program and to show readers how they can do so themselves.

To build Chromium yourself, you need Apple's developer tools, a reasonable level of comfort operating Xcode, a modicum of terminal-fu, and some experience with version control. It also helps if you had some decent hardware on-hand.

To get started, point your browser at the Chromium get-the-code page. As Google points out, the codebase contains hundreds of thousands of files, so it really helps to begin by downloading a tarball. Follow the most recent link from that page.

The uncompressed source tarball occupies about 5GB of disk space. Yes, you read that right. The gzipped archive alone was about a half GB. Ars tested the process on a Leopard 1.83 Intel Core 2 Duo mini with 1GB memory and found that hardware pretty woefully underpowered for the job at hand. (PowerPC is not supported at this time.) From start to end, the process took about 8 hours and the compilation is best run overnight.

Setting up and compiling

After extracting the source files from the tarball, install them into a convenient development folder. Make sure your directory path has no spaces. This little caveat has caught a few colleagues, whose builds failed because of the no-spaces rule. So be smart and check your path before you go any further.

Next, download a copy of the gclient depot tools. These scripts manage source checkouts for you. All installation involves is downloading an small archive, decompressing the files, and adding their folder into your search path. I don't use bash but there are bash instructions on the tool page if you do.