Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: chrome/browser/extensions/extensions_service.cc

Issue 3353015: Implement gallery install API (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: erik comments Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extensions_service.h" 5 #include "chrome/browser/extensions/extensions_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (StartsWithASCII(download_url.spec(), 146 if (StartsWithASCII(download_url.spec(),
147 extension_urls::kGalleryDownloadPrefix, false)) 147 extension_urls::kGalleryDownloadPrefix, false))
148 return true; 148 return true;
149 149
150 // Allow command line gallery url to be referrer for the gallery downloads. 150 // Allow command line gallery url to be referrer for the gallery downloads.
151 std::string command_line_gallery_url = 151 std::string command_line_gallery_url =
152 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 152 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
153 switches::kAppsGalleryURL); 153 switches::kAppsGalleryURL);
154 if (!command_line_gallery_url.empty() && 154 if (!command_line_gallery_url.empty() &&
155 StartsWithASCII(download_url.spec(), 155 StartsWithASCII(download_url.spec(),
156 extension_urls::kGalleryDownloadPrefix, false)) 156 command_line_gallery_url, false))
157 return true; 157 return true;
158 158
159 return false; 159 return false;
160 } 160 }
161 161
162 } // namespace 162 } // namespace
163 163
164 // static 164 // static
165 bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url, 165 bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url,
166 const GURL& referrer_url) { 166 const GURL& referrer_url) {
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 // Finish installing on UI thread. 1664 // Finish installing on UI thread.
1665 ChromeThread::PostTask( 1665 ChromeThread::PostTask(
1666 ChromeThread::UI, FROM_HERE, 1666 ChromeThread::UI, FROM_HERE,
1667 NewRunnableMethod( 1667 NewRunnableMethod(
1668 frontend_, 1668 frontend_,
1669 &ExtensionsService::ContinueLoadAllExtensions, 1669 &ExtensionsService::ContinueLoadAllExtensions,
1670 extensions_to_reload, 1670 extensions_to_reload,
1671 start_time, 1671 start_time,
1672 true)); 1672 true));
1673 } 1673 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webstore_private_api.cc ('k') | chrome/browser/resources/webstore_app/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698