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

Side by Side Diff: chrome/browser/android/contextualsearch/contextual_search_delegate.cc

Issue 2345843003: [Sync] Merge //components/browser_sync into one directory. (Closed)
Patch Set: Address comment + rebase. Created 4 years, 3 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
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 #include "chrome/browser/android/contextualsearch/contextual_search_delegate.h" 5 #include "chrome/browser/android/contextualsearch/contextual_search_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/json/json_string_value_serializer.h" 11 #include "base/json/json_string_value_serializer.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "chrome/browser/android/contextualsearch/contextual_search_field_trial. h" 15 #include "chrome/browser/android/contextualsearch/contextual_search_field_trial. h"
16 #include "chrome/browser/android/contextualsearch/resolved_search_term.h" 16 #include "chrome/browser/android/contextualsearch/resolved_search_term.h"
17 #include "chrome/browser/android/proto/client_discourse_context.pb.h" 17 #include "chrome/browser/android/proto/client_discourse_context.pb.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/sync/profile_sync_service_factory.h" 20 #include "chrome/browser/sync/profile_sync_service_factory.h"
21 #include "chrome/browser/translate/translate_service.h" 21 #include "chrome/browser/translate/translate_service.h"
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "components/browser_sync/browser/profile_sync_service.h" 23 #include "components/browser_sync/profile_sync_service.h"
24 #include "components/prefs/pref_service.h" 24 #include "components/prefs/pref_service.h"
25 #include "components/search_engines/template_url_service.h" 25 #include "components/search_engines/template_url_service.h"
26 #include "components/variations/net/variations_http_headers.h" 26 #include "components/variations/net/variations_http_headers.h"
27 #include "components/variations/variations_associated_data.h" 27 #include "components/variations/variations_associated_data.h"
28 #include "content/public/browser/render_frame_host.h" 28 #include "content/public/browser/render_frame_host.h"
29 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
30 #include "net/base/escape.h" 30 #include "net/base/escape.h"
31 #include "net/http/http_status_code.h" 31 #include "net/http/http_status_code.h"
32 #include "net/url_request/url_fetcher.h" 32 #include "net/url_request/url_fetcher.h"
33 #include "url/gurl.h" 33 #include "url/gurl.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 end_offset -= trim; 533 end_offset -= trim;
534 } 534 }
535 if (result_text.length() > end_offset + padding_each_side_pinned) { 535 if (result_text.length() > end_offset + padding_each_side_pinned) {
536 // Trim the end. 536 // Trim the end.
537 result_text = result_text.substr(0, end_offset + padding_each_side_pinned); 537 result_text = result_text.substr(0, end_offset + padding_each_side_pinned);
538 } 538 }
539 *start = start_offset; 539 *start = start_offset;
540 *end = end_offset; 540 *end = end_offset;
541 return result_text; 541 return result_text;
542 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_startup_flags.cc ('k') | chrome/browser/android/favicon_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698