| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ |
| 6 #define CHROME_BROWSER_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ | 6 #define CHROME_BROWSER_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
| 9 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 10 #include "chrome/browser/android/proto/delta_file.pb.h" | 11 #include "chrome/browser/android/proto/delta_file.pb.h" |
| 11 #include "components/bookmarks/browser/bookmark_model.h" | 12 #include "components/bookmarks/browser/bookmark_model.h" |
| 12 #include "components/history/core/browser/history_types.h" | 13 #include "components/history/core/browser/history_types.h" |
| 13 | 14 |
| 14 class GURL; | 15 class GURL; |
| 15 | 16 |
| 16 namespace history_report { | 17 namespace history_report { |
| 17 | 18 |
| 18 // Represents a single delta file entry with additional data. | 19 // Represents a single delta file entry with additional data. |
| 19 class DeltaFileEntryWithData { | 20 class DeltaFileEntryWithData { |
| 20 public: | 21 public: |
| 21 explicit DeltaFileEntryWithData(DeltaFileEntry entry); | 22 explicit DeltaFileEntryWithData(DeltaFileEntry entry); |
| 22 ~DeltaFileEntryWithData(); | 23 ~DeltaFileEntryWithData(); |
| 23 | 24 |
| 24 // Returns sequence number of this delta file entry. | 25 // Returns sequence number of this delta file entry. |
| 25 int64 SeqNo() const; | 26 int64_t SeqNo() const; |
| 26 | 27 |
| 27 // Returns type of delta file entry ('add' or 'del'). | 28 // Returns type of delta file entry ('add' or 'del'). |
| 28 std::string Type() const; | 29 std::string Type() const; |
| 29 | 30 |
| 30 // Returns ID of delta file entry. | 31 // Returns ID of delta file entry. |
| 31 std::string Id() const; | 32 std::string Id() const; |
| 32 | 33 |
| 33 // Returns url of delta file entry. | 34 // Returns url of delta file entry. |
| 34 std::string Url() const; | 35 std::string Url() const; |
| 35 | 36 |
| 36 // Returns title of delta file entry. | 37 // Returns title of delta file entry. |
| 37 base::string16 Title() const; | 38 base::string16 Title() const; |
| 38 | 39 |
| 39 // Returns ranking score of url described by delta file entry. | 40 // Returns ranking score of url described by delta file entry. |
| 40 int32 Score() const; | 41 int32_t Score() const; |
| 41 | 42 |
| 42 // Returns part of delta file entry's url | 43 // Returns part of delta file entry's url |
| 43 // which will be used as a key in search index. | 44 // which will be used as a key in search index. |
| 44 std::string IndexedUrl() const; | 45 std::string IndexedUrl() const; |
| 45 | 46 |
| 46 // Checks if delta file entry is valid and can be returned as a result. | 47 // Checks if delta file entry is valid and can be returned as a result. |
| 47 // Entries with missing data or the one that are hidden are not valid. | 48 // Entries with missing data or the one that are hidden are not valid. |
| 48 bool Valid() const; | 49 bool Valid() const; |
| 49 | 50 |
| 50 // Adds additional data to delta file entry. | 51 // Adds additional data to delta file entry. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 DeltaFileEntry entry_; | 64 DeltaFileEntry entry_; |
| 64 bool data_set_; | 65 bool data_set_; |
| 65 history::URLRow data_; | 66 history::URLRow data_; |
| 66 bool is_bookmark_; | 67 bool is_bookmark_; |
| 67 base::string16 bookmark_title_; | 68 base::string16 bookmark_title_; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace history_report | 71 } // namespace history_report |
| 71 | 72 |
| 72 #endif // CHROME_BROWSER_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ | 73 #endif // CHROME_BROWSER_ANDROID_HISTORY_REPORT_DELTA_FILE_COMMONS_H_ |
| OLD | NEW |