Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/drive/search_metadata.h" | 5 #include "chrome/browser/chromeos/drive/search_metadata.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 if ((options & SEARCH_METADATA_EXCLUDE_DIRECTORIES) && | 289 if ((options & SEARCH_METADATA_EXCLUDE_DIRECTORIES) && |
| 290 entry.file_info().is_directory()) | 290 entry.file_info().is_directory()) |
| 291 return false; | 291 return false; |
| 292 | 292 |
| 293 if (options & SEARCH_METADATA_SHARED_WITH_ME) | 293 if (options & SEARCH_METADATA_SHARED_WITH_ME) |
| 294 return entry.shared_with_me(); | 294 return entry.shared_with_me(); |
| 295 | 295 |
| 296 if (options & SEARCH_METADATA_OFFLINE) { | 296 if (options & SEARCH_METADATA_OFFLINE) { |
| 297 if (entry.file_specific_info().is_hosted_document()) { | 297 if (entry.file_specific_info().is_hosted_document()) { |
| 298 // Not all hosted documents are cached by Drive offline app. | 298 // Not all hosted documents are cached by Drive offline app. |
| 299 // http://support.google.com/drive/bin/answer.py?hl=en&answer=1628467 | 299 // https://support.google.com/drive/answer/1628467 |
|
alexab
2015/05/22 00:08:47
https://support.google.com/drive/answer/2375012
Dan Beam
2015/05/22 01:08:45
Done.
| |
| 300 std::string mime_type = entry.file_specific_info().content_mime_type(); | 300 std::string mime_type = entry.file_specific_info().content_mime_type(); |
| 301 return mime_type == drive::util::kGoogleDocumentMimeType || | 301 return mime_type == drive::util::kGoogleDocumentMimeType || |
| 302 mime_type == drive::util::kGoogleSpreadsheetMimeType || | 302 mime_type == drive::util::kGoogleSpreadsheetMimeType || |
| 303 mime_type == drive::util::kGooglePresentationMimeType || | 303 mime_type == drive::util::kGooglePresentationMimeType || |
| 304 mime_type == drive::util::kGoogleDrawingMimeType; | 304 mime_type == drive::util::kGoogleDrawingMimeType; |
| 305 } else { | 305 } else { |
| 306 return entry.file_specific_info().cache_state().is_present(); | 306 return entry.file_specific_info().cache_state().is_present(); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 330 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(pre))); | 330 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(pre))); |
| 331 highlighted_text->append("<b>"); | 331 highlighted_text->append("<b>"); |
| 332 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(match))); | 332 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(match))); |
| 333 highlighted_text->append("</b>"); | 333 highlighted_text->append("</b>"); |
| 334 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(post))); | 334 highlighted_text->append(net::EscapeForHTML(base::UTF16ToUTF8(post))); |
| 335 return true; | 335 return true; |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace internal | 338 } // namespace internal |
| 339 } // namespace drive | 339 } // namespace drive |
| OLD | NEW |