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

Side by Side Diff: ios/chrome/browser/ui/contextual_search/contextual_search_context.cc

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 3 years, 12 months 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 2014 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 #include "ios/chrome/browser/ui/contextual_search/contextual_search_context.h"
6
7 ContextualSearchContext::ContextualSearchContext(
8 const std::string& selected_text,
9 const bool use_resolved_search_term,
10 const GURL& page_url,
11 const std::string& encoding)
12 : selected_text(selected_text),
13 use_resolved_search_term(use_resolved_search_term),
14 page_url(page_url),
15 encoding(encoding),
16 start_offset(-1),
17 end_offset(-1) {}
18
19 ContextualSearchContext::~ContextualSearchContext() {}
20
21 bool ContextualSearchContext::HasSurroundingText() {
22 return start_offset != -1 && end_offset != -1 && !surrounding_text.empty();
23 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698