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

Side by Side Diff: chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc

Issue 537283002: Autocomplete: Fix a typo that flipped the extension keyword provider check for enabling in incognit… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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/autocomplete/keyword_extensions_delegate_impl.h" 5 #include "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" 8 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_util.h" 10 #include "chrome/browser/extensions/extension_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 bool KeywordExtensionsDelegateImpl::IsEnabledExtension( 52 bool KeywordExtensionsDelegateImpl::IsEnabledExtension(
53 const std::string& extension_id) { 53 const std::string& extension_id) {
54 ExtensionService* extension_service = 54 ExtensionService* extension_service =
55 extensions::ExtensionSystem::Get(profile_)->extension_service(); 55 extensions::ExtensionSystem::Get(profile_)->extension_service();
56 const extensions::Extension* extension = 56 const extensions::Extension* extension =
57 extension_service->GetExtensionById(extension_id, false); 57 extension_service->GetExtensionById(extension_id, false);
58 return extension && 58 return extension &&
59 (!profile_->IsOffTheRecord() || 59 (!profile_->IsOffTheRecord() ||
60 !extensions::util::IsIncognitoEnabled(extension_id, profile_)); 60 extensions::util::IsIncognitoEnabled(extension_id, profile_));
61 } 61 }
62 62
63 bool KeywordExtensionsDelegateImpl::Start( 63 bool KeywordExtensionsDelegateImpl::Start(
64 const AutocompleteInput& input, 64 const AutocompleteInput& input,
65 bool minimal_changes, 65 bool minimal_changes,
66 const TemplateURL* template_url, 66 const TemplateURL* template_url,
67 const base::string16& remaining_input) { 67 const base::string16& remaining_input) {
68 DCHECK(template_url); 68 DCHECK(template_url);
69 69
70 if (input.want_asynchronous_matches()) { 70 if (input.want_asynchronous_matches()) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 default: 205 default:
206 NOTREACHED(); 206 NOTREACHED();
207 return; 207 return;
208 } 208 }
209 } 209 }
210 210
211 void KeywordExtensionsDelegateImpl::OnProviderUpdate(bool updated_matches) { 211 void KeywordExtensionsDelegateImpl::OnProviderUpdate(bool updated_matches) {
212 provider_->listener_->OnProviderUpdate(updated_matches); 212 provider_->listener_->OnProviderUpdate(updated_matches);
213 } 213 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698