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

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

Issue 7259019: Move base/values.h into the base namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 (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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 class DictionaryValue;
12 class GURL; 11 class GURL;
13 class PrefService; 12 class PrefService;
14 13
14 namespace base {
15 class DictionaryValue;
16 }
17
15 class ExternalProtocolHandler { 18 class ExternalProtocolHandler {
16 public: 19 public:
17 enum BlockState { 20 enum BlockState {
18 DONT_BLOCK, 21 DONT_BLOCK,
19 BLOCK, 22 BLOCK,
20 UNKNOWN, 23 UNKNOWN,
21 }; 24 };
22 25
23 // Returns whether we should block a given scheme. 26 // Returns whether we should block a given scheme.
24 static BlockState GetBlockState(const std::string& scheme); 27 static BlockState GetBlockState(const std::string& scheme);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // "Launch Application" in an ExternalProtocolDialog.) It is assumed that the 62 // "Launch Application" in an ExternalProtocolDialog.) It is assumed that the
60 // url has already been escaped, which happens in LaunchUrl. 63 // url has already been escaped, which happens in LaunchUrl.
61 // NOTE: You should Not call this function directly unless you are sure the 64 // NOTE: You should Not call this function directly unless you are sure the
62 // url you have has been checked against the blacklist, and has been escaped. 65 // url you have has been checked against the blacklist, and has been escaped.
63 // All calls to this function should originate in some way from LaunchUrl. 66 // All calls to this function should originate in some way from LaunchUrl.
64 // This will execute on the file thread. 67 // This will execute on the file thread.
65 static void LaunchUrlWithoutSecurityCheck(const GURL& url); 68 static void LaunchUrlWithoutSecurityCheck(const GURL& url);
66 69
67 // Prepopulates the dictionary with known protocols to deny or allow, if 70 // Prepopulates the dictionary with known protocols to deny or allow, if
68 // preferences for them do not already exist. 71 // preferences for them do not already exist.
69 static void PrepopulateDictionary(DictionaryValue* win_pref); 72 static void PrepopulateDictionary(base::DictionaryValue* win_pref);
70 73
71 // Allows LaunchUrl to proceed with launching an external protocol handler. 74 // Allows LaunchUrl to proceed with launching an external protocol handler.
72 // This is typically triggered by a user gesture, but is also called for 75 // This is typically triggered by a user gesture, but is also called for
73 // each extension API function. Note that each call to LaunchUrl resets 76 // each extension API function. Note that each call to LaunchUrl resets
74 // the state to false (not allowed). 77 // the state to false (not allowed).
75 static void PermitLaunchUrl(); 78 static void PermitLaunchUrl();
76 }; 79 };
77 80
78 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_ 81 #endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.h ('k') | chrome/browser/geolocation/geolocation_content_settings_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698