OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/enhanced_bookmarks/bookmark_server_search_service.h" | 5 #include "components/enhanced_bookmarks/bookmark_server_search_service.h" |
6 | 6 |
7 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" | 7 #include "components/enhanced_bookmarks/enhanced_bookmark_model.h" |
8 #include "components/enhanced_bookmarks/enhanced_bookmark_utils.h" | 8 #include "components/enhanced_bookmarks/enhanced_bookmark_utils.h" |
9 #include "components/enhanced_bookmarks/proto/search.pb.h" | 9 #include "components/enhanced_bookmarks/proto/search.pb.h" |
10 #include "net/base/url_util.h" | 10 #include "net/base/url_util.h" |
11 #include "net/url_request/url_fetcher.h" | 11 #include "net/url_request/url_fetcher.h" |
12 | 12 |
| 13 using bookmarks::BookmarkNode; |
| 14 |
13 namespace { | 15 namespace { |
14 const char kSearchUrl[] = "https://www.google.com/stars/search"; | 16 const char kSearchUrl[] = "https://www.google.com/stars/search"; |
15 const int kSearchCacheMaxSize = 50; | 17 const int kSearchCacheMaxSize = 50; |
16 } // namespace | 18 } // namespace |
17 | 19 |
18 namespace enhanced_bookmarks { | 20 namespace enhanced_bookmarks { |
19 | 21 |
20 BookmarkServerSearchService::BookmarkServerSearchService( | 22 BookmarkServerSearchService::BookmarkServerSearchService( |
21 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 23 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
22 ProfileOAuth2TokenService* token_service, | 24 ProfileOAuth2TokenService* token_service, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 cache_.Clear(); | 118 cache_.Clear(); |
117 } | 119 } |
118 | 120 |
119 void BookmarkServerSearchService::EnhancedBookmarkRemoteIdChanged( | 121 void BookmarkServerSearchService::EnhancedBookmarkRemoteIdChanged( |
120 const BookmarkNode* node, | 122 const BookmarkNode* node, |
121 const std::string& old_remote_id, | 123 const std::string& old_remote_id, |
122 const std::string& remote_id) { | 124 const std::string& remote_id) { |
123 cache_.Clear(); | 125 cache_.Clear(); |
124 } | 126 } |
125 } // namespace enhanced_bookmarks | 127 } // namespace enhanced_bookmarks |
OLD | NEW |