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

Side by Side Diff: chrome/browser/file_select_helper.h

Issue 10908262: [cros] disable GDrive option on certain file pickers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review Created 8 years, 3 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) 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 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_ 5 #ifndef CHROME_BROWSER_FILE_SELECT_HELPER_H_
6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_ 6 #define CHROME_BROWSER_FILE_SELECT_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // Cleans up and releases this instance. This must be called after the last 120 // Cleans up and releases this instance. This must be called after the last
121 // callback is received from the enumeration code. 121 // callback is received from the enumeration code.
122 void EnumerateDirectoryEnd(); 122 void EnumerateDirectoryEnd();
123 123
124 // Helper method to get allowed extensions for select file dialog from 124 // Helper method to get allowed extensions for select file dialog from
125 // the specified accept types as defined in the spec: 125 // the specified accept types as defined in the spec:
126 // http://whatwg.org/html/number-state.html#attr-input-accept 126 // http://whatwg.org/html/number-state.html#attr-input-accept
127 // |accept_types| contains only valid lowercased MIME types or file extensions 127 // |accept_types| contains only valid lowercased MIME types or file extensions
128 // beginning with a period (.). 128 // beginning with a period (.).
129 ui::SelectFileDialog::FileTypeInfo* GetFileTypesFromAcceptType( 129 static scoped_ptr<ui::SelectFileDialog::FileTypeInfo>
130 const std::vector<string16>& accept_types); 130 GetFileTypesFromAcceptType(const std::vector<string16>& accept_types);
131 131
132 // Check the accept type is valid. It is expected to be all lower case with 132 // Check the accept type is valid. It is expected to be all lower case with
133 // no whitespace. 133 // no whitespace.
134 static bool IsAcceptTypeValid(const std::string& accept_type); 134 static bool IsAcceptTypeValid(const std::string& accept_type);
135 135
136 // Profile used to set/retrieve the last used directory. 136 // Profile used to set/retrieve the last used directory.
137 Profile* profile_; 137 Profile* profile_;
138 138
139 // The RenderViewHost and WebContents for the page showing a file dialog 139 // The RenderViewHost and WebContents for the page showing a file dialog
140 // (may only be one such dialog). 140 // (may only be one such dialog).
(...skipping 13 matching lines...) Expand all
154 struct ActiveDirectoryEnumeration; 154 struct ActiveDirectoryEnumeration;
155 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_; 155 std::map<int, ActiveDirectoryEnumeration*> directory_enumerations_;
156 156
157 // Registrar for notifications regarding our RenderViewHost. 157 // Registrar for notifications regarding our RenderViewHost.
158 content::NotificationRegistrar notification_registrar_; 158 content::NotificationRegistrar notification_registrar_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper); 160 DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
161 }; 161 };
162 162
163 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_ 163 #endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698