Home | History | Annotate | Download | only in file_manager
      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 
     16 namespace file_manager {
     17 namespace util {
     18 
     19 // Returns the file manager's base URL, which just looks like
     20 // chrome-extension://<app-id>/.
     21 GURL GetFileManagerBaseUrl();
     22 
     23 // Returns the file manager's main page URL.
     24 GURL 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.
     28 GURL 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