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

Side by Side Diff: chrome/browser/external_protocol/external_protocol_handler.cc

Issue 11316038: Make it so the windows store protocol is properly handled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/platform_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/external_protocol/external_protocol_handler.h" 5 #include "chrome/browser/external_protocol/external_protocol_handler.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // iframe or a redirect, it looks like an external protocol, but we don't 165 // iframe or a redirect, it looks like an external protocol, but we don't
166 // want to shellexecute it. 166 // want to shellexecute it.
167 "view-source", 167 "view-source",
168 "vnd.ms.radio", 168 "vnd.ms.radio",
169 }; 169 };
170 170
171 static const char* const allowed_schemes[] = { 171 static const char* const allowed_schemes[] = {
172 "mailto", 172 "mailto",
173 "news", 173 "news",
174 "snews", 174 "snews",
175 #if defined(OS_WIN)
176 "ms-windows-store",
177 #endif
175 }; 178 };
176 179
177 bool should_block; 180 bool should_block;
178 for (size_t i = 0; i < arraysize(denied_schemes); ++i) { 181 for (size_t i = 0; i < arraysize(denied_schemes); ++i) {
179 if (!win_pref->GetBoolean(denied_schemes[i], &should_block)) { 182 if (!win_pref->GetBoolean(denied_schemes[i], &should_block)) {
180 win_pref->SetBoolean(denied_schemes[i], true); 183 win_pref->SetBoolean(denied_schemes[i], true);
181 } 184 }
182 } 185 }
183 186
184 for (size_t i = 0; i < arraysize(allowed_schemes); ++i) { 187 for (size_t i = 0; i < arraysize(allowed_schemes); ++i) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // static 298 // static
296 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) { 299 void ExternalProtocolHandler::RegisterPrefs(PrefService* prefs) {
297 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes); 300 prefs->RegisterDictionaryPref(prefs::kExcludedSchemes);
298 } 301 }
299 302
300 // static 303 // static
301 void ExternalProtocolHandler::PermitLaunchUrl() { 304 void ExternalProtocolHandler::PermitLaunchUrl() {
302 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 305 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
303 g_accept_requests = true; 306 g_accept_requests = true;
304 } 307 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/platform_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698