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

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

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove is_valid check Created 7 years 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/external_protocol/external_protocol_handler.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ 5 #ifndef CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_
6 #define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ 6 #define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/shell_integration.h" 10 #include "chrome/browser/shell_integration.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 static void RegisterPrefs(PrefRegistrySimple* registry); 81 static void RegisterPrefs(PrefRegistrySimple* registry);
82 82
83 // Starts a url using the external protocol handler with the help 83 // Starts a url using the external protocol handler with the help
84 // of shellexecute. Should only be called if the protocol is whitelisted 84 // of shellexecute. Should only be called if the protocol is whitelisted
85 // (checked in LaunchUrl) or if the user explicitly allows it. (By selecting 85 // (checked in LaunchUrl) or if the user explicitly allows it. (By selecting
86 // "Launch Application" in an ExternalProtocolDialog.) It is assumed that the 86 // "Launch Application" in an ExternalProtocolDialog.) It is assumed that the
87 // url has already been escaped, which happens in LaunchUrl. 87 // url has already been escaped, which happens in LaunchUrl.
88 // NOTE: You should Not call this function directly unless you are sure the 88 // NOTE: You should Not call this function directly unless you are sure the
89 // url you have has been checked against the blacklist, and has been escaped. 89 // url you have has been checked against the blacklist, and has been escaped.
90 // All calls to this function should originate in some way from LaunchUrl. 90 // All calls to this function should originate in some way from LaunchUrl.
91 // This will execute on the file thread. 91 static void LaunchUrlWithoutSecurityCheck(const GURL& url,
92 static void LaunchUrlWithoutSecurityCheck(const GURL& url); 92 int render_process_host_id,
93 int tab_contents_id);
93 94
94 // Prepopulates the dictionary with known protocols to deny or allow, if 95 // Prepopulates the dictionary with known protocols to deny or allow, if
95 // preferences for them do not already exist. 96 // preferences for them do not already exist.
96 static void PrepopulateDictionary(base::DictionaryValue* win_pref); 97 static void PrepopulateDictionary(base::DictionaryValue* win_pref);
97 98
98 // Allows LaunchUrl to proceed with launching an external protocol handler. 99 // Allows LaunchUrl to proceed with launching an external protocol handler.
99 // This is typically triggered by a user gesture, but is also called for 100 // This is typically triggered by a user gesture, but is also called for
100 // each extension API function. Note that each call to LaunchUrl resets 101 // each extension API function. Note that each call to LaunchUrl resets
101 // the state to false (not allowed). 102 // the state to false (not allowed).
102 static void PermitLaunchUrl(); 103 static void PermitLaunchUrl();
103 }; 104 };
104 105
105 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ 106 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/external_protocol/external_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698