url_util.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
1// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// This file provides URL-related utilities.
6
7#ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_URL_UTIL_H_
8#define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_URL_UTIL_H_
9
10#include <string>
11
12#include "base/strings/string16.h"
13#include "ui/shell_dialogs/select_file_dialog.h"
14#include "url/gurl.h"
15
16namespace file_manager {
17namespace util {
18
19// Returns the file manager's base URL, which just looks like
20// chrome-extension://<app-id>/.
21GURL GetFileManagerBaseUrl();
22
23// Returns the file manager's main page URL.
24GURL GetFileManagerMainPageUrl();
25
26// Returns the file manager's main page URL with parameters encoded as JSON
27// in the query string section. |file_types| is optional.
28GURL GetFileManagerMainPageUrlWithParams(
29    ui::SelectFileDialog::Type type,
30    const base::string16& title,
31    const GURL& current_directory_url,
32    const GURL& selection_url,
33    const std::string& target_name,
34    const ui::SelectFileDialog::FileTypeInfo* file_types,
35    int file_type_index,
36    const base::FilePath::StringType& default_extension);
37
38}  // namespace util
39}  // namespace file_manager
40
41#endif  // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_URL_UTIL_H_
42