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 #ifndef CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ |
6 #define CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ | 6 #define CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "components/history/core/browser/android/sql_handler.h" | 11 #include "components/history/core/browser/android/sql_handler.h" |
9 | 12 |
10 class Profile; | 13 class Profile; |
11 | 14 |
12 namespace bookmarks { | 15 namespace bookmarks { |
13 class BookmarkModel; | 16 class BookmarkModel; |
14 } | 17 } |
15 | 18 |
16 namespace history { | 19 namespace history { |
17 | 20 |
(...skipping 26 matching lines...) Expand all Loading... |
44 // we working on is still valid at the time it is used. | 47 // we working on is still valid at the time it is used. |
45 Task(); | 48 Task(); |
46 | 49 |
47 // Add the a bookmark with the given |url| to mobile folder. | 50 // Add the a bookmark with the given |url| to mobile folder. |
48 void AddBookmarkToMobileFolder(const GURL& url, | 51 void AddBookmarkToMobileFolder(const GURL& url, |
49 const base::string16& title); | 52 const base::string16& title); |
50 | 53 |
51 // Adds a bookmark with the given |url|, |title| and |parent_id|. | 54 // Adds a bookmark with the given |url|, |title| and |parent_id|. |
52 void AddBookmark(const GURL& url, | 55 void AddBookmark(const GURL& url, |
53 const base::string16& title, | 56 const base::string16& title, |
54 int64 parent_id); | 57 int64_t parent_id); |
55 | 58 |
56 // Removes the bookmark with the given |url|. | 59 // Removes the bookmark with the given |url|. |
57 void RemoveBookmark(const GURL& url); | 60 void RemoveBookmark(const GURL& url); |
58 | 61 |
59 // Updates the given bookmark's title. | 62 // Updates the given bookmark's title. |
60 void UpdateBookmarkTitle(const GURL& url, | 63 void UpdateBookmarkTitle(const GURL& url, |
61 const base::string16& title); | 64 const base::string16& title); |
62 | 65 |
63 private: | 66 private: |
64 friend class base::RefCountedThreadSafe<Task>; | 67 friend class base::RefCountedThreadSafe<Task>; |
65 ~Task(); | 68 ~Task(); |
66 | 69 |
67 // Returns profile_'s BookmarkModel if the profile_ is valid. | 70 // Returns profile_'s BookmarkModel if the profile_ is valid. |
68 bookmarks::BookmarkModel* GetBookmarkModel(); | 71 bookmarks::BookmarkModel* GetBookmarkModel(); |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(Task); | 73 DISALLOW_COPY_AND_ASSIGN(Task); |
71 }; | 74 }; |
72 | 75 |
73 URLDatabase* url_database_; | 76 URLDatabase* url_database_; |
74 | 77 |
75 DISALLOW_COPY_AND_ASSIGN(BookmarkModelSQLHandler); | 78 DISALLOW_COPY_AND_ASSIGN(BookmarkModelSQLHandler); |
76 }; | 79 }; |
77 | 80 |
78 } // namespace history. | 81 } // namespace history. |
79 | 82 |
80 #endif // CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ | 83 #endif // CHROME_BROWSER_HISTORY_ANDROID_BOOKMARK_MODEL_SQL_HANDLER_H_ |
OLD | NEW |