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

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

Issue 8784006: Replace the GURL referrer field of OpenURLParams with a content::Referrer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 if (inline_install_not_supported) { 232 if (inline_install_not_supported) {
233 std::string redirect_url; 233 std::string redirect_url;
234 if (!webstore_data->GetString(kRedirectUrlKey, &redirect_url)) { 234 if (!webstore_data->GetString(kRedirectUrlKey, &redirect_url)) {
235 CompleteInstall(kInvalidWebstoreResponseError); 235 CompleteInstall(kInvalidWebstoreResponseError);
236 return; 236 return;
237 } 237 }
238 238
239 tab_contents()->OpenURL(OpenURLParams( 239 tab_contents()->OpenURL(OpenURLParams(
240 GURL(redirect_url), 240 GURL(redirect_url),
241 tab_contents()->GetURL(), 241 content::Referrer(tab_contents()->GetURL(),
242 WebKit::WebReferrerPolicyDefault),
242 NEW_FOREGROUND_TAB, 243 NEW_FOREGROUND_TAB,
243 content::PAGE_TRANSITION_AUTO_BOOKMARK, 244 content::PAGE_TRANSITION_AUTO_BOOKMARK,
244 false)); 245 false));
245 CompleteInstall(kInlineInstallSupportedError); 246 CompleteInstall(kInlineInstallSupportedError);
246 return; 247 return;
247 } 248 }
248 249
249 // Manifest, number of users, average rating and rating count are required. 250 // Manifest, number of users, average rating and rating count are required.
250 std::string manifest; 251 std::string manifest;
251 if (!webstore_data->GetString(kManifestKey, &manifest) || 252 if (!webstore_data->GetString(kManifestKey, &manifest) ||
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 if (tab_contents()) { 427 if (tab_contents()) {
427 if (error.empty()) { 428 if (error.empty()) {
428 delegate_->OnInlineInstallSuccess(install_id_); 429 delegate_->OnInlineInstallSuccess(install_id_);
429 } else { 430 } else {
430 delegate_->OnInlineInstallFailure(install_id_, error); 431 delegate_->OnInlineInstallFailure(install_id_, error);
431 } 432 }
432 } 433 }
433 434
434 Release(); // Matches the AddRef in BeginInstall. 435 Release(); // Matches the AddRef in BeginInstall.
435 } 436 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698