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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webstore_inline_installer.h" 5 #include "chrome/browser/extensions/webstore_inline_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 id_(webstore_item_id), 156 id_(webstore_item_id),
157 requestor_url_(requestor_url), 157 requestor_url_(requestor_url),
158 delegate_(delegate), 158 delegate_(delegate),
159 average_rating_(0.0), 159 average_rating_(0.0),
160 rating_count_(0) { 160 rating_count_(0) {
161 } 161 }
162 162
163 void WebstoreInlineInstaller::BeginInstall() { 163 void WebstoreInlineInstaller::BeginInstall() {
164 AddRef(); // Balanced in CompleteInstall or WebContentsDestroyed. 164 AddRef(); // Balanced in CompleteInstall or WebContentsDestroyed.
165 165
166 if (!Extension::IdIsValid(id_)) { 166 if (!extensions::Extension::IdIsValid(id_)) {
167 CompleteInstall(kInvalidWebstoreItemId); 167 CompleteInstall(kInvalidWebstoreItemId);
168 return; 168 return;
169 } 169 }
170 170
171 GURL webstore_data_url(extension_urls::GetWebstoreItemJsonDataURL(id_)); 171 GURL webstore_data_url(extension_urls::GetWebstoreItemJsonDataURL(id_));
172 172
173 webstore_data_url_fetcher_.reset(content::URLFetcher::Create( 173 webstore_data_url_fetcher_.reset(content::URLFetcher::Create(
174 webstore_data_url, content::URLFetcher::GET, this)); 174 webstore_data_url, content::URLFetcher::GET, this));
175 Profile* profile = Profile::FromBrowserContext( 175 Profile* profile = Profile::FromBrowserContext(
176 web_contents()->GetBrowserContext()); 176 web_contents()->GetBrowserContext());
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 verified_site_pattern.Parse(verified_site_url); 446 verified_site_pattern.Parse(verified_site_url);
447 if (parse_result != URLPattern::PARSE_SUCCESS) { 447 if (parse_result != URLPattern::PARSE_SUCCESS) {
448 DLOG(WARNING) << "Could not parse " << verified_site_url << 448 DLOG(WARNING) << "Could not parse " << verified_site_url <<
449 " as URL pattern " << parse_result; 449 " as URL pattern " << parse_result;
450 return false; 450 return false;
451 } 451 }
452 verified_site_pattern.SetScheme("*"); 452 verified_site_pattern.SetScheme("*");
453 453
454 return verified_site_pattern.MatchesURL(requestor_url); 454 return verified_site_pattern.MatchesURL(requestor_url);
455 } 455 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.h ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698