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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/prefs/pref_service.h"
13 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/android/contextualsearch/resolved_search_term.h" 15 #include "chrome/browser/android/contextualsearch/resolved_search_term.h"
17 #include "chrome/browser/android/proto/client_discourse_context.pb.h" 16 #include "chrome/browser/android/proto/client_discourse_context.pb.h"
18 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/browser/sync/profile_sync_service_factory.h" 19 #include "chrome/browser/sync/profile_sync_service_factory.h"
21 #include "chrome/browser/translate/translate_service.h" 20 #include "chrome/browser/translate/translate_service.h"
22 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
23 #include "components/browser_sync/browser/profile_sync_service.h" 22 #include "components/browser_sync/browser/profile_sync_service.h"
23 #include "components/prefs/pref_service.h"
24 #include "components/search_engines/template_url_service.h" 24 #include "components/search_engines/template_url_service.h"
25 #include "components/variations/net/variations_http_headers.h" 25 #include "components/variations/net/variations_http_headers.h"
26 #include "components/variations/variations_associated_data.h" 26 #include "components/variations/variations_associated_data.h"
27 #include "content/public/browser/android/content_view_core.h" 27 #include "content/public/browser/android/content_view_core.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "net/base/escape.h" 29 #include "net/base/escape.h"
30 #include "net/url_request/url_fetcher.h" 30 #include "net/url_request/url_fetcher.h"
31 #include "url/gurl.h" 31 #include "url/gurl.h"
32 32
33 using content::ContentViewCore; 33 using content::ContentViewCore;
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 end_offset -= trim; 550 end_offset -= trim;
551 } 551 }
552 if (result_text.length() > end_offset + padding_each_side_pinned) { 552 if (result_text.length() > end_offset + padding_each_side_pinned) {
553 // Trim the end. 553 // Trim the end.
554 result_text = result_text.substr(0, end_offset + padding_each_side_pinned); 554 result_text = result_text.substr(0, end_offset + padding_each_side_pinned);
555 } 555 }
556 *start = start_offset; 556 *start = start_offset;
557 *end = end_offset; 557 *end = end_offset;
558 return result_text; 558 return result_text;
559 } 559 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_application.cc ('k') | chrome/browser/android/contextualsearch/contextual_search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698