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

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

Issue 1419103009: [Sync] Componentize ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@max_bogue_sync_backend_host
Patch Set: Created 5 years, 1 month 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/proto/client_discourse_context.pb.h" 15 #include "chrome/browser/android/proto/client_discourse_context.pb.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/sync/profile_sync_service.h"
19 #include "chrome/browser/sync/profile_sync_service_factory.h" 18 #include "chrome/browser/sync/profile_sync_service_factory.h"
19 #include "components/browser_sync/browser/profile_sync_service.h"
20 #include "components/search_engines/template_url_service.h" 20 #include "components/search_engines/template_url_service.h"
21 #include "components/variations/net/variations_http_header_provider.h" 21 #include "components/variations/net/variations_http_header_provider.h"
22 #include "components/variations/variations_associated_data.h" 22 #include "components/variations/variations_associated_data.h"
23 #include "content/public/browser/android/content_view_core.h" 23 #include "content/public/browser/android/content_view_core.h"
24 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
25 #include "net/base/escape.h" 25 #include "net/base/escape.h"
26 #include "net/url_request/url_fetcher.h" 26 #include "net/url_request/url_fetcher.h"
27 #include "url/gurl.h" 27 #include "url/gurl.h"
28 28
29 using content::ContentViewCore; 29 using content::ContentViewCore;
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 end_offset -= trim; 524 end_offset -= trim;
525 } 525 }
526 if (result_text.length() > end_offset + padding_each_side_pinned) { 526 if (result_text.length() > end_offset + padding_each_side_pinned) {
527 // Trim the end. 527 // Trim the end.
528 result_text = result_text.substr(0, end_offset + padding_each_side_pinned); 528 result_text = result_text.substr(0, end_offset + padding_each_side_pinned);
529 } 529 }
530 *start = start_offset; 530 *start = start_offset;
531 *end = end_offset; 531 *end = end_offset;
532 return result_text; 532 return result_text;
533 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698