OLD | NEW |
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 "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
10 #include "content/public/browser/navigation_details.h" | 10 #include "content/public/browser/navigation_details.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 new ExtensionInstallPrompt::Prompt( | 107 new ExtensionInstallPrompt::Prompt( |
108 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); | 108 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT)); |
109 | 109 |
110 // crbug.com/260742: Don't display the user count if it's zero. The reason | 110 // crbug.com/260742: Don't display the user count if it's zero. The reason |
111 // it's zero is very often that the number isn't actually being counted | 111 // it's zero is very often that the number isn't actually being counted |
112 // (intentionally), which means that it's unlikely to be correct. | 112 // (intentionally), which means that it's unlikely to be correct. |
113 prompt->SetWebstoreData(localized_user_count(), | 113 prompt->SetWebstoreData(localized_user_count(), |
114 show_user_count(), | 114 show_user_count(), |
115 average_rating(), | 115 average_rating(), |
116 rating_count()); | 116 rating_count()); |
117 return prompt.Pass(); | 117 return prompt; |
118 } | 118 } |
119 | 119 |
120 bool WebstoreInlineInstaller::ShouldShowPostInstallUI() const { | 120 bool WebstoreInlineInstaller::ShouldShowPostInstallUI() const { |
121 return true; | 121 return true; |
122 } | 122 } |
123 | 123 |
124 bool WebstoreInlineInstaller::ShouldShowAppInstalledBubble() const { | 124 bool WebstoreInlineInstaller::ShouldShowAppInstalledBubble() const { |
125 return true; | 125 return true; |
126 } | 126 } |
127 | 127 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec << | 235 DLOG(WARNING) << "Could not parse " << verified_site_pattern_spec << |
236 " as URL pattern " << parse_result; | 236 " as URL pattern " << parse_result; |
237 return false; | 237 return false; |
238 } | 238 } |
239 verified_site_pattern.SetScheme("*"); | 239 verified_site_pattern.SetScheme("*"); |
240 | 240 |
241 return verified_site_pattern.MatchesURL(requestor_url); | 241 return verified_site_pattern.MatchesURL(requestor_url); |
242 } | 242 } |
243 | 243 |
244 } // namespace extensions | 244 } // namespace extensions |
OLD | NEW |