12

I'd like to download some Chromium source code. In particular, the folder described at https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/

How can I do that?

I can't see the clone URL. I'm not even sure whether it's a git repo.

Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
  • Did you have a look at: http://dev.chromium.org/developers/how-tos/get-the-code (the link you gave looks a lot like an SVN repo) – Nobody moving away from SE Mar 12 '14 at 16:31
  • @Nobody thanks. Yes I found that doc, and found it hopelessly unclear. – Colonel Panic Mar 12 '14 at 16:57
  • Faster fetching of Chromium source code: https://stackoverflow.com/questions/47087970/how-to-checkout-and-build-specific-chromium-tag-branch-without-download-the-full/47093174#47093174 – Asesh Jan 02 '21 at 03:44

5 Answers5

16

Per https://chromium.googlesource.com/chromium/src

git clone https://chromium.googlesource.com/chromium/src

Easy peasy lemon squeezy

Colonel Panic
  • 132,665
  • 89
  • 401
  • 465
  • 1
    Please regular update your answer. As its now 2016 where we should look for. –  Jan 20 '16 at 15:56
3

As of today, you can get it from GitHub:

The official GitHub mirror of the Chromium source: https://github.com/chromium/chromium

Speedoops
  • 126
  • 2
2

Cloning with git clone is a tad slow. See bolded text below.

https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_build_instructions.md#get-the-code

Create a chromium directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces):

$ mkdir ~/chromium && cd ~/chromium

Run the fetch tool from depot_tools to check out the code and its dependencies.

$ fetch --nohooks chromium

If you don't want the full repo history, you can save a lot of time by adding the --no-history flag to fetch.

Expect the command to take 30 minutes on even a fast connection, and many hours on slower ones.

Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
1

Remove the /viewvc from url and clone (checkout) with svn checkout <url-without-viewvc>

Not this: svn checkout http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/

But this: svn checkout http://src.chromium.org/chrome/trunk/src/chrome/common/extensions/docs/

guneysus
  • 6,203
  • 2
  • 45
  • 47
0

The chromium page on googlesource.com has exact instructions for the same.

Page: https://chromium.googlesource.com/chromium/src

git clone https://chromium.googlesource.com/chromium/src
Yash Kumar Verma
  • 9,427
  • 2
  • 17
  • 28