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

Side by Side Diff: chrome/browser/ui/app_list/search/webstore_provider.cc

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/app_list/search/webstore_provider.h" 5 #include "chrome/browser/ui/app_list/search/webstore_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (!query_as_url.username().empty() || 66 if (!query_as_url.username().empty() ||
67 !query_as_url.port().empty() || 67 !query_as_url.port().empty() ||
68 !query_as_url.query().empty() || 68 !query_as_url.query().empty() ||
69 !query_as_url.ref().empty()) { 69 !query_as_url.ref().empty()) {
70 return true; 70 return true;
71 } 71 }
72 72
73 // Don't send anything for https except the hostname. Hostnames are OK 73 // Don't send anything for https except the hostname. Hostnames are OK
74 // because they are visible when the TCP connection is established, but the 74 // because they are visible when the TCP connection is established, but the
75 // specific path may reveal private information. 75 // specific path may reveal private information.
76 if (LowerCaseEqualsASCII(query_as_url.scheme(), chrome::kHttpsScheme) && 76 if (LowerCaseEqualsASCII(query_as_url.scheme(), content::kHttpsScheme) &&
77 !query_as_url.path().empty() && 77 !query_as_url.path().empty() && query_as_url.path() != "/") {
78 query_as_url.path() != "/") {
79 return true; 78 return true;
80 } 79 }
81 80
82 return false; 81 return false;
83 } 82 }
84 83
85 } // namespace 84 } // namespace
86 85
87 WebstoreProvider::WebstoreProvider(Profile* profile, 86 WebstoreProvider::WebstoreProvider(Profile* profile,
88 AppListControllerDelegate* controller) 87 AppListControllerDelegate* controller)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 GURL icon_url(icon_url_string); 215 GURL icon_url(icon_url_string);
217 if (!icon_url.is_valid()) 216 if (!icon_url.is_valid())
218 return result.Pass(); 217 return result.Pass();
219 218
220 result.reset(new WebstoreResult( 219 result.reset(new WebstoreResult(
221 profile_, app_id, localized_name, icon_url, controller_)); 220 profile_, app_id, localized_name, icon_url, controller_));
222 return result.Pass(); 221 return result.Pass();
223 } 222 }
224 223
225 } // namespace app_list 224 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698