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

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

Issue 1387403003: Add support for calling Cortana URI scheme on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 "view-source", 187 "view-source",
188 "vnd.ms.radio", 188 "vnd.ms.radio",
189 }; 189 };
190 190
191 static const char* const allowed_schemes[] = { 191 static const char* const allowed_schemes[] = {
192 "mailto", 192 "mailto",
193 "news", 193 "news",
194 "snews", 194 "snews",
195 #if defined(OS_WIN) 195 #if defined(OS_WIN)
196 "ms-windows-store", 196 "ms-windows-store",
197 "ms-cortana",
197 #endif 198 #endif
198 }; 199 };
199 200
200 bool should_block; 201 bool should_block;
201 for (size_t i = 0; i < arraysize(denied_schemes); ++i) { 202 for (size_t i = 0; i < arraysize(denied_schemes); ++i) {
202 if (!win_pref->GetBoolean(denied_schemes[i], &should_block)) { 203 if (!win_pref->GetBoolean(denied_schemes[i], &should_block)) {
203 win_pref->SetBoolean(denied_schemes[i], true); 204 win_pref->SetBoolean(denied_schemes[i], true);
204 } 205 }
205 } 206 }
206 207
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // static 323 // static
323 void ExternalProtocolHandler::RegisterPrefs(PrefRegistrySimple* registry) { 324 void ExternalProtocolHandler::RegisterPrefs(PrefRegistrySimple* registry) {
324 registry->RegisterDictionaryPref(prefs::kExcludedSchemes); 325 registry->RegisterDictionaryPref(prefs::kExcludedSchemes);
325 } 326 }
326 327
327 // static 328 // static
328 void ExternalProtocolHandler::PermitLaunchUrl() { 329 void ExternalProtocolHandler::PermitLaunchUrl() {
329 DCHECK(base::MessageLoopForUI::IsCurrent()); 330 DCHECK(base::MessageLoopForUI::IsCurrent());
330 g_accept_requests = true; 331 g_accept_requests = true;
331 } 332 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698