OLD | NEW |
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 #include "chrome/browser/chromeos/extensions/file_manager/url_util.h" | 5 #include "chrome/browser/chromeos/file_manager/url_util.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/extensions/file_manager/app_id.h" | 9 #include "chrome/browser/chromeos/file_manager/app_id.h" |
10 #include "net/base/escape.h" | 10 #include "net/base/escape.h" |
11 | 11 |
12 namespace file_manager { | 12 namespace file_manager { |
13 namespace util { | 13 namespace util { |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Returns a file manager URL for the given |path|. | 16 // Returns a file manager URL for the given |path|. |
17 GURL GetFileManagerUrl(const char* path) { | 17 GURL GetFileManagerUrl(const char* path) { |
18 return GURL(std::string("chrome-extension://") + kFileManagerAppId + path); | 18 return GURL(std::string("chrome-extension://") + kFileManagerAppId + path); |
19 } | 19 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 std::string url = GetFileManagerUrl("/action_choice.html").spec(); | 126 std::string url = GetFileManagerUrl("/action_choice.html").spec(); |
127 if (advanced_mode) | 127 if (advanced_mode) |
128 url += "?advanced-mode"; | 128 url += "?advanced-mode"; |
129 url += "#/" + net::EscapeUrlEncodedData(virtual_path.value(), | 129 url += "#/" + net::EscapeUrlEncodedData(virtual_path.value(), |
130 false); // Space to %20 instead of +. | 130 false); // Space to %20 instead of +. |
131 return GURL(url); | 131 return GURL(url); |
132 } | 132 } |
133 | 133 |
134 } // namespace util | 134 } // namespace util |
135 } // namespace file_manager | 135 } // namespace file_manager |
OLD | NEW |