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 8224023: Don't show URL for pending new navigations initiated by the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 2 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 | 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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 std::string redirect_url; 225 std::string redirect_url;
226 if (!webstore_data->GetString(kRedirectUrlKey, &redirect_url)) { 226 if (!webstore_data->GetString(kRedirectUrlKey, &redirect_url)) {
227 CompleteInstall(kInvalidWebstoreResponseError); 227 CompleteInstall(kInvalidWebstoreResponseError);
228 return; 228 return;
229 } 229 }
230 230
231 tab_contents()->OpenURL(OpenURLParams( 231 tab_contents()->OpenURL(OpenURLParams(
232 GURL(redirect_url), 232 GURL(redirect_url),
233 tab_contents()->GetURL(), 233 tab_contents()->GetURL(),
234 NEW_FOREGROUND_TAB, 234 NEW_FOREGROUND_TAB,
235 content::PAGE_TRANSITION_AUTO_BOOKMARK)); 235 content::PAGE_TRANSITION_AUTO_BOOKMARK,
236 false));
236 CompleteInstall(kInlineInstallSupportedError); 237 CompleteInstall(kInlineInstallSupportedError);
237 return; 238 return;
238 } 239 }
239 240
240 // Manifest, number of users, average rating and rating count are required. 241 // Manifest, number of users, average rating and rating count are required.
241 std::string manifest; 242 std::string manifest;
242 if (!webstore_data->GetString(kManifestKey, &manifest) || 243 if (!webstore_data->GetString(kManifestKey, &manifest) ||
243 !webstore_data->GetString(kUsersKey, &localized_user_count_) || 244 !webstore_data->GetString(kUsersKey, &localized_user_count_) ||
244 !webstore_data->GetDouble(kAverageRatingKey, &average_rating_) || 245 !webstore_data->GetDouble(kAverageRatingKey, &average_rating_) ||
245 !webstore_data->GetInteger(kRatingCountKey, &rating_count_)) { 246 !webstore_data->GetInteger(kRatingCountKey, &rating_count_)) {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (tab_contents()) { 413 if (tab_contents()) {
413 if (error.empty()) { 414 if (error.empty()) {
414 delegate_->OnInlineInstallSuccess(install_id_); 415 delegate_->OnInlineInstallSuccess(install_id_);
415 } else { 416 } else {
416 delegate_->OnInlineInstallFailure(install_id_, error); 417 delegate_->OnInlineInstallFailure(install_id_, error);
417 } 418 }
418 } 419 }
419 420
420 Release(); // Matches the AddRef in BeginInstall. 421 Release(); // Matches the AddRef in BeginInstall.
421 } 422 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/external_tab_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698