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

Side by Side Diff: ios/chrome/browser/search/search_util.cc

Issue 1667733002: Move chrome_browser_state.{cc,h} to ios/chrome/browser/browser_state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test_support_ios
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 "ios/chrome/browser/search/search_util.h" 5 #include "ios/chrome/browser/search/search_util.h"
6 6
7 #include "components/search/search.h" 7 #include "components/search/search.h"
8 #include "components/search_engines/template_url_service.h" 8 #include "components/search_engines/template_url_service.h"
9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
9 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" 10 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
10 #include "ios/chrome/browser/search_engines/ui_thread_search_terms_data.h" 11 #include "ios/chrome/browser/search_engines/ui_thread_search_terms_data.h"
11 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h"
12 #include "ios/web/public/navigation_item.h" 12 #include "ios/web/public/navigation_item.h"
13 #include "ios/web/public/navigation_manager.h" 13 #include "ios/web/public/navigation_manager.h"
14 #include "ios/web/public/web_state/web_state.h" 14 #include "ios/web/public/web_state/web_state.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace { 17 namespace {
18 18
19 TemplateURL* GetDefaultSearchProviderTemplateURL( 19 TemplateURL* GetDefaultSearchProviderTemplateURL(
20 ios::ChromeBrowserState* browser_state) { 20 ios::ChromeBrowserState* browser_state) {
21 if (!browser_state) 21 if (!browser_state)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (!search::IsQueryExtractionEnabled()) 60 if (!search::IsQueryExtractionEnabled())
61 return base::string16(); 61 return base::string16();
62 62
63 ios::ChromeBrowserState* browser_state = 63 ios::ChromeBrowserState* browser_state =
64 ios::ChromeBrowserState::FromBrowserState(web_state->GetBrowserState()); 64 ios::ChromeBrowserState::FromBrowserState(web_state->GetBrowserState());
65 if (!IsQueryExtractionAllowedForURL(browser_state, item->GetVirtualURL())) 65 if (!IsQueryExtractionAllowedForURL(browser_state, item->GetVirtualURL()))
66 return base::string16(); 66 return base::string16();
67 67
68 return ExtractSearchTermsFromURL(browser_state, item->GetVirtualURL()); 68 return ExtractSearchTermsFromURL(browser_state, item->GetVirtualURL());
69 } 69 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/safe_browsing/ui_manager.cc ('k') | ios/chrome/browser/search_engines/template_url_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698