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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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) 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 "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 std::string redirect_url; 92 std::string redirect_url;
93 if (!webstore_data.GetString(kRedirectUrlKey, &redirect_url)) { 93 if (!webstore_data.GetString(kRedirectUrlKey, &redirect_url)) {
94 *error = kInvalidWebstoreResponseError; 94 *error = kInvalidWebstoreResponseError;
95 return false; 95 return false;
96 } 96 }
97 web_contents()->OpenURL( 97 web_contents()->OpenURL(
98 content::OpenURLParams( 98 content::OpenURLParams(
99 GURL(redirect_url), 99 GURL(redirect_url),
100 content::Referrer(web_contents()->GetURL(), 100 content::Referrer(web_contents()->GetURL(),
101 blink::WebReferrerPolicyDefault), 101 blink::WebReferrerPolicyDefault),
102 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_AUTO_BOOKMARK, false)); 102 NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_AUTO_BOOKMARK, false));
103 *error = kInlineInstallSupportedError; 103 *error = kInlineInstallSupportedError;
104 return false; 104 return false;
105 } 105 }
106 106
107 *error = ""; 107 *error = "";
108 return true; 108 return true;
109 } 109 }
110 110
111 bool WebstoreInlineInstaller::CheckRequestorPermitted( 111 bool WebstoreInlineInstaller::CheckRequestorPermitted(
112 const base::DictionaryValue& webstore_data, 112 const base::DictionaryValue& webstore_data,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec << 206 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec <<
207 " as URL pattern " << parse_result; 207 " as URL pattern " << parse_result;
208 return false; 208 return false;
209 } 209 }
210 verified_site_pattern.SetScheme("*"); 210 verified_site_pattern.SetScheme("*");
211 211
212 return verified_site_pattern.MatchesURL(requestor_url); 212 return verified_site_pattern.MatchesURL(requestor_url);
213 } 213 }
214 214
215 } // namespace extensions 215 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui.cc ('k') | chrome/browser/extensions/window_open_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698