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

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

Issue 14189011: Remove instant confirmation dialog that is displayed the first time the instant checkbox is clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove prefs::InstantConfirmDialogShown Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/search/search.h" 5 #include "chrome/browser/search/search.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) { 342 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
343 return url.is_valid() && 343 return url.is_valid() &&
344 profile && 344 profile &&
345 (url.SchemeIs(chrome::kChromeSearchScheme) || 345 (url.SchemeIs(chrome::kChromeSearchScheme) ||
346 IsInstantURL(url, profile)); 346 IsInstantURL(url, profile));
347 } 347 }
348 348
349 void RegisterInstantUserPrefs(PrefRegistrySyncable* registry) { 349 void RegisterInstantUserPrefs(PrefRegistrySyncable* registry) {
350 registry->RegisterBooleanPref(prefs::kInstantConfirmDialogShown, false,
351 PrefRegistrySyncable::SYNCABLE_PREF);
352 registry->RegisterBooleanPref(prefs::kInstantEnabled, false, 350 registry->RegisterBooleanPref(prefs::kInstantEnabled, false,
353 PrefRegistrySyncable::SYNCABLE_PREF); 351 PrefRegistrySyncable::SYNCABLE_PREF);
354 // This default is overridden by SetInstantExtendedPrefDefault(). 352 // This default is overridden by SetInstantExtendedPrefDefault().
355 registry->RegisterBooleanPref(prefs::kInstantExtendedEnabled, false, 353 registry->RegisterBooleanPref(prefs::kInstantExtendedEnabled, false,
356 PrefRegistrySyncable::SYNCABLE_PREF); 354 PrefRegistrySyncable::SYNCABLE_PREF);
357 } 355 }
358 356
359 const char* GetInstantPrefName() { 357 const char* GetInstantPrefName() {
360 return IsInstantExtendedAPIEnabled() ? prefs::kInstantExtendedEnabled : 358 return IsInstantExtendedAPIEnabled() ? prefs::kInstantExtendedEnabled :
361 prefs::kInstantEnabled; 359 prefs::kInstantEnabled;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 replacements.SetHostStr(search_host); 596 replacements.SetHostStr(search_host);
599 replacements.SetPortStr(search_port); 597 replacements.SetPortStr(search_port);
600 return instant_url.ReplaceComponents(replacements); 598 return instant_url.ReplaceComponents(replacements);
601 } 599 }
602 600
603 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url) { 601 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url) {
604 return MatchesOrigin(my_url, other_url) && my_url.path() == other_url.path(); 602 return MatchesOrigin(my_url, other_url) && my_url.path() == other_url.path();
605 } 603 }
606 604
607 } // namespace chrome 605 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/options.js ('k') | chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698