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

Side by Side Diff: ios/chrome/browser/reading_list/offline_url_utils.h

Issue 2506993002: Create offline_url_utils (Closed)
Patch Set: use StringPrintf Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef IOS_CHROME_BROWSER_READING_LIST_OFFLINE_URL_UTILS_H_
6 #define IOS_CHROME_BROWSER_READING_LIST_OFFLINE_URL_UTILS_H_
7
8 #include <string>
9
10 #include "base/files/file_path.h"
11 #include "url/gurl.h"
12
13 namespace reading_list {
14
15 // The absolute path of the directory where offline URLs are saved.
16 base::FilePath OfflineRootDirectoryPath(const base::FilePath& profile_path);
gambard 2016/11/16 12:44:20 Add comments for the argument please.
Olivier 2016/11/16 13:36:27 Done.
17
18 // The absolute path of the directory where a specific URL is saved offline.
19 // Contains the page and supporting files (images).
20 base::FilePath OfflineURLDirectoryAbsolutePath(
21 const base::FilePath& profile_path,
gambard 2016/11/16 12:44:19 Same
Olivier 2016/11/16 13:36:27 Done.
22 const GURL& url);
23
24 // The absolute path of the offline webpage for the URL. The file may not
25 // exist.
26 base::FilePath OfflinePageAbsolutePath(const base::FilePath& profile_path,
gambard 2016/11/16 12:44:20 Same
Olivier 2016/11/16 13:36:27 Done.
27 const GURL& url);
28
29 // The relative path to the distilled page. The result is relative to
gambard 2016/11/16 12:44:19 Please add a logical link between "distilled page"
Olivier 2016/11/16 13:36:27 Done.
30 // |OfflineRootDirectoryPath()|.
31 base::FilePath OfflinePagePath(const GURL& url);
32
33 // The name of the directory containing offline data for |url|.
34 std::string OfflineURLDirectoryID(const GURL& url);
35
36 // The distilled URL chrome://offline/... that will load the file at |path|.
37 GURL DistilledURLForPath(const base::FilePath& path);
38
39 // The file URL pointing to the local file to load whan displaying
gambard 2016/11/16 12:44:20 s/whan/when/
Olivier 2016/11/16 13:36:27 Done.
40 // |distilled_url|. If |resources_root_url| is not nullptr, it is set to a file
gambard 2016/11/16 12:44:19 Maybe add where we are displaying |distilled_url|?
Olivier 2016/11/16 13:36:27 I don't think this utility function needs to know
41 // URL to the directory conatining all the resources needed by |distilled_url|.
42 // |profile_path| is the path to the profile directory.
43 GURL FileURLForDistilledURL(const GURL& distilled_url,
44 const base::FilePath& profile_path,
45 GURL* resources_root_url);
46
47 } // namespace reading_list
48
49 #endif // IOS_CHROME_BROWSER_READING_LIST_OFFLINE_URL_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698