summaryrefslogtreecommitdiffstats
path: root/chrome/browser/google/google_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Componentize google_utilblundell@chromium.org2014-06-191-217/+0
| | | | | | | | | | | | Also removes the indirection through the client that GoogleURLTracker was previously doing to call a google_util function. BUG=373245,381088 TBR=jochen Review URL: https://codereview.chromium.org/333723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278448 0039d316-1c4b-4281-b951-d872f2087c98
* Set x-chrome-connected header on youtubeguohui@chromium.org2014-06-171-15/+41
| | | | | | | | BUG=384531 Review URL: https://codereview.chromium.org/331963004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277646 0039d316-1c4b-4281-b951-d872f2087c98
* Change google_util::AppendGoogleLocaleParam to take in the application localeblundell@chromium.org2014-06-131-10/+3
| | | | | | | | | | | | This function will be componentized, and hence cannot reference g_browser_process. BUG=373203 TBR=thakis Review URL: https://codereview.chromium.org/327793005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276886 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize URLFixerUpper.blundell@chromium.org2014-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | This CL moves URLFixerUpper into a new url_fixer component to allow this code to be shared by the iOS port. At the present time the component contains some minor Chrome-specific logic. Specifically, it rewrites about:// to chrome:// and uses about:// version as the default about:// host. We decided not to abstract this logic at this time, as the only embedders wishing to use this component are ports of Chrome. However, if there comes to be a non-Chrome embedder that wishes to use this component, this behavior could easily be generalized (e.g., by exposing the variables that are used for these purposes in the header file to allow the embedder to customize them). BUG=373229 R=jam@chromium.org TBR=mmenke NOTREECHECKS=true Review URL: https://codereview.chromium.org/320253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276672 0039d316-1c4b-4281-b951-d872f2087c98
* Change google_util::GetGoogleLocale() to take in the application localeblundell@chromium.org2014-06-111-8/+5
| | | | | | | | | | | This function will be componentized and so cannot reference g_browser_process. google_util::AppendGoogleLocaleToURL() will be handled in followup work. BUG=373203 Review URL: https://codereview.chromium.org/327833002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276406 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize GoogleURLTracker(InfoBarDelegate,MapEntry,NavHelper)blundell@chromium.org2014-06-081-0/+1
| | | | | | | | | | | | | | | | | | This CL moves GoogleURLTracker and associated friends to the Google component. It additionally moves strings that GoogleURLTrackerInfoBarDelegate into components_strings.grd (via google_strings.grdp). Dependencies of this code on google_util are temporarily punched through the embedder, as google_util will require more time to componentize. Once google_util is componentized, the indirection through the embedder will be removed. BUG=373209,373222 TBR=thakis, cbentzel Review URL: https://codereview.chromium.org/316203003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275743 0039d316-1c4b-4281-b951-d872f2087c98
* Move branding information out of google_utilblundell@chromium.org2014-06-061-122/+0
| | | | | | | | | | | | | google_util is intended for componentization, whereas the information of what the current brand is and whether a given brand is organic is inherently embedder-specific. This functionality is moved to a new google_brand namespace. BUG=373224 TBR=jochen Review URL: https://codereview.chromium.org/316963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275413 0039d316-1c4b-4281-b951-d872f2087c98
* Abstract GoogleURLTracker & google_util Profile dependenciesblundell@chromium.org2014-06-041-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This CL eliminates GoogleURLTracker and google_util having static functions that take in Profiles as arguments and use the Profile to get at the GoogleURLTracker instance. Specifically, it does the following: - Introduces google_profile_helper, as well as a new GetGoogleHomePageURL(Profile) function that serves the purpose previously being served by GoogleURLTracker::GoogleURL(Profile). - The google_util GetGoogleCountryCode(Profile) and GetGoogleSearchURL(Profile) functions now take in the Google homepage URL to operate on rather than the Profile. - Turns GoogleURLTracker's static RequestServerCheck(Profile) and GoogleURLSearchCommitted(Profile) into instance methods, changing callsites to get the tracker from the factory and call the instance method on the tracker if it is not NULL. GoogleURLTracker still uses the Profile to get the Prefs; this will be changed in a different CL. BUG=373235,373223 TBR=thakis Review URL: https://codereview.chromium.org/303233006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274679 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate GoogleURLTracker's dependence on //chrome-level switchesblundell@chromium.org2014-06-011-1/+1
| | | | | | | | | | | | | | - switches::kGoogleBaseURL is moved into the Google component - The information of whether background networking is enabled is now obtained from GoogleURLTrackerClient. BUG=373222 TBR=thakis Review URL: https://codereview.chromium.org/301383003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274143 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed namespaces in src/chrome.vitalybuka@chromium.org2014-04-301-3/+2
| | | | | | | | | | | | url_util -> url url_parse -> url url_canon -> url BUG=364747 Review URL: https://codereview.chromium.org/260623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 262846, as the revert has now been merged to M35.mmenke@chromium.org2014-04-151-19/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Still need to fix the underlying tracking issue before M36 branch. > Revert 255617, due to it not tracking use of the link doctor page properly. > > Not reverting the string changes, because the new strings work with the old > file, and we've passed string freeze. > > > Switch to using the new Link Doctor API. > > > > The new API allows Link Doctor results to be integrated into Chrome's > > own error pages. > > BUG=64832, 359131 > TBR=mmenke@chromium.org > > Originally Landed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255617 > > Review URL: https://codereview.chromium.org/228803002 TBR=mmenke@chromium.org Review URL: https://codereview.chromium.org/235883010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263956 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 255617, due to it not tracking use of the link doctor page properly.mmenke@chromium.org2014-04-091-43/+19
| | | | | | | | | | | | | | | | | | Not reverting the string changes, because the new strings work with the old file, and we've passed string freeze. > Switch to using the new Link Doctor API. > > The new API allows Link Doctor results to be integrated into Chrome's > own error pages. BUG=64832, 260709 TBR=mmenke@chromium.org Originally Landed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255617 Review URL: https://codereview.chromium.org/228803002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262846 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore --google-base-url if the specified URL has a query or ref.pkasting@chromium.org2014-03-241-11/+25
| | | | | | | | | | | | | | We also fix up the passed-in string, so users have a little more flexibility in syntax, e.g. you can now specify a base URL of just "google.com" instead of "http://google.com/". BUG=240746 TEST=none R=samarth@chromium.org Review URL: https://codereview.chromium.org/197583011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258969 0039d316-1c4b-4281-b951-d872f2087c98
* Move UTF16ToASCII, remove WideToASCII.brettw@chromium.org2014-03-141-2/+2
| | | | | | | | | | | | | | | | This removes WideToASCII and changes all callers to use UTF16ToASCII instead. Moves UTF16ToASCII from base/strings/string_util.h to base/strings/utf_string_conversions.h and into the base namespace. Convert a few related string_util functions to take a StringPiece16 instead of a string16. Remove IsStringASCII(std::wstring) which was unused. Updates callers' includes and namespace usage accordingly. TBR=sky Review URL: https://codereview.chromium.org/176843022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257200 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a variety of defunct flags.estade@chromium.org2014-03-141-9/+0
| | | | | | | | BUG=350163, 350166, 350174 Review URL: https://codereview.chromium.org/191823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257014 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 254207 (Reverted in 254241, due to a missing line. Cleaned up code a ↵mmenke@chromium.org2014-03-071-19/+43
| | | | | | | | | | | | | | | | | | | | | little as well) Switch to using the new Link Doctor API. The new API allows Link Doctor results to be integrated into Chrome's own error pages. BUG=64832 R=tsepez@chromium.org, ttuttle@chromium.org TBR=pkasting@chomium.org, thakis@chromium.org Originally Landed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254207 Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=254241 Review URL: https://codereview.chromium.org/184973003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255617 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 254207 "Switch to using the new Link Doctor API."erikwright@chromium.org2014-02-281-43/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a memory leak. It appears |suggestions| was mismanaged? http://build.chromium.org/p/chromium.memory/builders/Linux%20Chromium%20OS%20ASAN%20Tests%20%283%29/builds/13714/steps/unit_tests/logs/OfflinePageDontProceed Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x4b1711 in operator new(unsigned long) /usr/local/google/work/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:54 #1 0x61e7518 in LocalizedError::GetStrings(int, std::string const&, GURL const&, bool, bool, std::string const&, std::string const&, scoped_ptr\u003CLocalizedError::ErrorPageParams, base::DefaultDeleter\u003CLocalizedError::ErrorPageParams> >, base::DictionaryValue*) chrome/common/localized_error.cc:686 #2 0x111d82c0 in chromeos::OfflineLoadPage::GetHTMLContents() chrome/browser/chromeos/offline/offline_load_page.cc:98 #3 0xfb6f1fd in content::InterstitialPageImpl::Show() content/browser/frame_host/interstitial_page_impl.cc:248 #4 0x13fc43e in chromeos::OfflineLoadPageTest::ShowInterstitial(char const*) chrome/browser/chromeos/offline/offline_load_page_unittest.cc:71 #5 0x13fc870 in chromeos::OfflineLoadPageTest_OfflinePageDontProceed_Test::TestBody() chrome/browser/chromeos/offline/offline_load_page_unittest.cc:128 #6 0x800bf1a in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2045 #7 0x800bf1a in testing::Test::Run() testing/gtest/src/gtest.cc:2061 #8 0x800e349 in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2237 #9 0x800f0c3 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2344 #10 0x801fd1a in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4065 #11 0x801f320 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2045 #12 0x801f320 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:3697 #13 0x129f3154 in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2231 #14 0x129f3154 in base::TestSuite::Run() base/test/test_suite.cc:213 #15 0x129ea3b7 in Run base/callback.h:401 #16 0x129ea3b7 in base::(anonymous namespace)::LaunchUnitTestsInternal(int, char**, base::Callback\u003Cint ()> const&, int) base/test/launcher/unit_test_launcher.cc:494 #17 0x820ee6d in main chrome/test/base/run_all_unittests.cc:13 #18 0x7f1d7d44d76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 > Switch to using the new Link Doctor API. > > The new API allows Link Doctor results to be integrated into Chrome's > own error pages. > > BUG=64832 > R=pkasting@chromium.org, thakis@chromium.org, tsepez@chromium.org, ttuttle@chromium.org > > Review URL: https://codereview.chromium.org/137623011 TBR=mmenke@chromium.org Review URL: https://codereview.chromium.org/185003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254241 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using the new Link Doctor API.mmenke@chromium.org2014-02-281-19/+43
| | | | | | | | | | | | The new API allows Link Doctor results to be integrated into Chrome's own error pages. BUG=64832 R=pkasting@chromium.org, thakis@chromium.org, tsepez@chromium.org, ttuttle@chromium.org Review URL: https://codereview.chromium.org/137623011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254207 0039d316-1c4b-4281-b951-d872f2087c98
* Convert string16 to use base namespace.brettw@chromium.org2013-12-091-2/+2
| | | | | | | | TBR=sky Review URL: https://codereview.chromium.org/109233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239538 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce GURL::SchemeIsHttpFamily(), which returns true for http and https.cdn@chromium.org2013-08-221-1/+1
| | | | | | | | | | BUG=274679 TEST=N/A TBR=cbentzel, jamesr, simonjam, tzik, stevet, mpcomplete Review URL: https://chromiumcodereview.appspot.com/23064011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218893 0039d316-1c4b-4281-b951-d872f2087c98
* chrome/browser: Migrate from googleurl/ includes to url/ ones. Part 1tfarina@chromium.org2013-07-021-1/+1
| | | | | | | | | BUG=229660 TBR=darin@chromium.org Review URL: https://chromiumcodereview.appspot.com/18054023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209705 0039d316-1c4b-4281-b951-d872f2087c98
* Add --google-base-url, which sets the Google base URL used in variouspkasting@chromium.org2013-07-011-0/+15
| | | | | | | | | | | | search/suggest/instant URLs. BUG=249197 TEST=Run with --google-base-url=http://foo.com/, try to search from the omnibox, see it try to load URLs on foo.com R=jered@chromium.org Review URL: https://codereview.chromium.org/18100003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209457 0039d316-1c4b-4281-b951-d872f2087c98
* Misc. cleanup:pkasting@chromium.org2013-06-281-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reduce indenting levels * Align args per style guide * Improve (or remove) comments * Pass around TemplateURL*s where convenient and safe instead of converting to/from keywords. This generally simplifies things slightly and will be useful for subsequent changes that need the TemplateURL*s in more places. * Don't handle DCHECK failure * Nuke long-outdated disabled KeywordProvider unittest * Attempt (and probably fail) to put SearchProvider::CreateSearchSuggestion() args in some sort of order * Remove using directives where they don't save lines * Follow style guide class declaration order * Use OVERRIDE * Make function declaration and definition order match * Shorten/simplify code * Put all three IsGoogleXXX() functions that take URLs in one group * Eliminate unnecessary #includes * Add GetDefaultSearchURLForSearchTerms() function to c/b/search_engines/util.h since many disparate callers want to do that (and in a subsequent change I'll want to slightly modify how that works) * Fix presubmit warning about mismatched braces * Remove unnecessary ResetDefaultTemplateURL() calls from ToolbarModel tests BUG=249197 TEST=none R=cpu@chromium.org, jered@chromium.org Review URL: https://codereview.chromium.org/18119005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209228 0039d316-1c4b-4281-b951-d872f2087c98
* Change various google_util functions from taking a std::string to a GURL.pkasting@chromium.org2013-06-271-12/+7
| | | | | | | | | | BUG=249197 TEST=none TBR=jered,sky Review URL: https://codereview.chromium.org/18110003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209004 0039d316-1c4b-4281-b951-d872f2087c98
* Remove --instant-url. Its use cases will be addressed by --google-base-url andpkasting@chromium.org2013-06-271-20/+5
| | | | | | | | | | | | --extra-search-query-params. BUG=249197 TEST=none TBR=jered Review URL: https://codereview.chromium.org/18114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208988 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in chrome/browser/e*-h*/.avi@chromium.org2013-06-101-2/+2
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16703006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205319 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in chrome/browser/, part 2.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16561007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204977 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for split Public Suffix List distinctions.nyquist@chromium.org2013-05-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the private additions to the Public Suffix List. * Since net::RegistryControlledDomainService only contained static methods, this CL changes these methods to be contained within the namespace net::registry_controlled_domains and removes the class entirely. * All methods defined as part of net::registry_controlled_domains now have a mandatory argument to specify whether the private registries should be included. * Since the old implementation did not take into account the private registries, this sets all old callers to use EXCLUDE_PRIVATE as the net::registry_controlled_domains::PrivateRegistryFilter argument. * Changes the parameter for including unknown registries or not to be an enum instead of a boolean, using a similar naming scheme as for the private registries: net::registry_controlled_domains::UnknownRegistryFilter. * This also updates the effective-TLD data file to: 45cfff9c781f 2013-04-23 11:51 +0100 It includes changes from a number of Mozilla bugs, listed on https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat between 290afd57d2a8 (2012-07-04 16:08 +0100) and 45cfff9c781f (2013-04-23 11:51 +0100). Patch set 1 is equal to the committed patch set from: https://codereview.chromium.org/13979002/ TBRing OWNERs from original CL. TBR=pam@chromium.org BUG=37436, 96086 Review URL: https://codereview.chromium.org/15140003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200066 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 199771 "Add support for split Public Suffix List distinct..."nyquist@chromium.org2013-05-131-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Add support for split Public Suffix List distinctions. > > This adds support for the private additions to the Public Suffix List. > > * Since net::RegistryControlledDomainService only contained static methods, this > CL changes these methods to be contained within the namespace > net::registry_controlled_domains and removes the class entirely. > * All methods defined as part of net::registry_controlled_domains now > have a mandatory argument to specify whether the private registries > should be included. > * Since the old implementation did not take into account the private > registries, this sets all old callers to use EXCLUDE_PRIVATE as the > net::registry_controlled_domains::PrivateRegistryFilter argument. > * Changes the parameter for including unknown registries or not to be an enum > instead of a boolean, using a similar naming scheme as for the private > registries: net::registry_controlled_domains::UnknownRegistryFilter. > * This also updates the effective-TLD data file to: > 45cfff9c781f 2013-04-23 11:51 +0100 > It includes changes from a number of Mozilla bugs, listed on > https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat > between 290afd57d2a8 (2012-07-04 16:08 +0100) and > 45cfff9c781f (2013-04-23 11:51 +0100). > > BUG=37436,96086 > R=brettw@chromium.org, erikwright@chromium.org, pam@chromium.org, rsleevi@chromium.org, sky@chromium.org > > Review URL: https://codereview.chromium.org/13979002 TBR=nyquist@chromium.org Review URL: https://codereview.chromium.org/14767028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199774 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for split Public Suffix List distinctions.nyquist@chromium.org2013-05-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the private additions to the Public Suffix List. * Since net::RegistryControlledDomainService only contained static methods, this CL changes these methods to be contained within the namespace net::registry_controlled_domains and removes the class entirely. * All methods defined as part of net::registry_controlled_domains now have a mandatory argument to specify whether the private registries should be included. * Since the old implementation did not take into account the private registries, this sets all old callers to use EXCLUDE_PRIVATE as the net::registry_controlled_domains::PrivateRegistryFilter argument. * Changes the parameter for including unknown registries or not to be an enum instead of a boolean, using a similar naming scheme as for the private registries: net::registry_controlled_domains::UnknownRegistryFilter. * This also updates the effective-TLD data file to: 45cfff9c781f 2013-04-23 11:51 +0100 It includes changes from a number of Mozilla bugs, listed on https://hg.mozilla.org/mozilla-central/log/45cfff9c781f/netwerk/dns/effective_tld_names.dat between 290afd57d2a8 (2012-07-04 16:08 +0100) and 45cfff9c781f (2013-04-23 11:51 +0100). BUG=37436,96086 R=brettw@chromium.org, erikwright@chromium.org, pam@chromium.org, rsleevi@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/13979002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199771 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* Choose sboxchip parameter in URL fragment over value in query.cramya@chromium.org2013-03-201-18/+12
| | | | | | | | | | | | | | GetCorpusNameForMobile() needs to check if there is an sboxchip parameter in the URL fragment, and if so, prefer that over the value in the query. Without this, we will often parse out an incorrect chip value on tablet. BUG=179439 Review URL: https://chromiumcodereview.appspot.com/12902020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189240 0039d316-1c4b-4281-b951-d872f2087c98
* chrome: Update include paths of string_split.h to its new location.tfarina@chromium.org2013-02-281-1/+1
| | | | | | | | | | BUG=175186 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/12378016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185315 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 184352brettw@chromium.org2013-02-241-2/+2
| | | | | | | | | | | | | | | | | > Add utf_string_conversions to base namespace. > > This adds "using"s for all functions so those can be fixed in a separate pass. > > This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. > > BUG= > > Review URL: https://codereview.chromium.org/12314090 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/12315071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184355 0039d316-1c4b-4281-b951-d872f2087c98
* Add utf_string_conversions to base namespace.brettw@chromium.org2013-02-241-2/+2
| | | | | | | | | | | | This adds "using"s for all functions so those can be fixed in a separate pass. This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. BUG= Review URL: https://codereview.chromium.org/12314090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184352 0039d316-1c4b-4281-b951-d872f2087c98
* Getting rid of IsInstantExtendedAPIGoogleSearchUrl now that it is no longer ↵beaudoin@chromium.org2013-02-241-23/+0
| | | | | | | | | | | needed. BUG=161602 Review URL: https://chromiumcodereview.appspot.com/12317057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184333 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FilePath to base::FilePath and use new location of ↵brettw@chromium.org2013-02-081-1/+1
| | | | | | | | string_number_conversions in some chrome subdirectories. Review URL: https://codereview.chromium.org/12218065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181564 0039d316-1c4b-4281-b951-d872f2087c98
* google_apis: Move AppendQueryParameter() etc. from common/net/url_util.h totfarina@chromium.org2013-01-311-4/+4
| | | | | | | | | | | | | | | net/base/url_util.h Which removes one more dependency on chrome/common/ BUG=146989 TEST=net_unittests --gtest_filter=UrlUtilTest* R=satorux@chromium.org,mmenke@chromium.org TBR=darin@chromium.org Review URL: https://chromiumcodereview.appspot.com/12069004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179902 0039d316-1c4b-4281-b951-d872f2087c98
* [rlz,cros] RLZ glue for ChromeOS.ivankr@chromium.org2012-12-051-0/+4
| | | | | | | | | BUG=157348,160059 TBR=nirnimesh,sky Review URL: https://chromiumcodereview.appspot.com/11412067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171233 0039d316-1c4b-4281-b951-d872f2087c98
* Introduces a search term extraction mechanism working for arbitrary search ↵beaudoin@chromium.org2012-10-091-45/+0
| | | | | | | | | | | | | | | providers. Repalces the omnibox content with the actual search term when searching on the user's default search engine. Meant to be used with instant extended. Note: Will only convert URLs that have the espv=1 query parameter. BUG=139176, 135106 Review URL: https://chromiumcodereview.appspot.com/10908226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160884 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the X-Chrome-Variations header to transmit to all ports.stevet@chromium.org2012-09-061-7/+10
| | | | | | | | | | | This is to make internal testing simpler. BUG=145886 TEST=Navigate to a *.google.<TLD> URL with a port other than 80 (or 443 on https). Ensure that the X-Chrome-Variations header is transmitted as part of that request. Review URL: https://chromiumcodereview.appspot.com/10908028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155095 0039d316-1c4b-4281-b951-d872f2087c98
* Support debug servers for Instant.dcblack@chromium.org2012-09-011-2/+16
| | | | | | | | Allow the debug url given in the --instant-url command line flag to count as a Google URL for the purposes of Instant support. Review URL: https://chromiumcodereview.appspot.com/10914045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154556 0039d316-1c4b-4281-b951-d872f2087c98
* Remove searchTerms from the Instant URL.sreeram@chromium.org2012-08-301-1/+1
| | | | | | | | | | | | | | | | | | We would always replace searchTerms with a blank string when loading the Instant URL, so it never served any useful purpose, except to confuse maintainers about whether or not the Instant template was a valid one to consider for search terms extraction. Also make a minor change to the instantEnabledParam so that it appends a "&" instead of prepending it, thus being more consistent with other params. BUG=139176 R=dominich@chromium.org,pkasting@chromium.org,sky@chromium.org TEST=none; no change in functionality. Review URL: https://chromiumcodereview.appspot.com/10823417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154255 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for Google Instant search URL search term extraction.dominich@chromium.org2012-08-281-19/+33
| | | | | | | | | | | | Also add some unit tests. BUG=135106 R=sreeram@chromium.org,isherman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10883068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153773 0039d316-1c4b-4281-b951-d872f2087c98
* A simple version of search term replacement for testing. Google search URLs ↵dominich@chromium.org2012-08-241-0/+30
| | | | | | | | | | | that support the extended instant API will be replaced in the Omnibox by the search terms. BUG=135106,139176 Review URL: https://chromiumcodereview.appspot.com/10867038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153341 0039d316-1c4b-4281-b951-d872f2087c98
* Remove LinkDoctor from Chromium.tony@chromium.org2012-08-231-2/+19
| | | | | | | | | | | | | | | | | | We want to be able to limit the requests to this URL (e.g., by using an API key). To do that, we need to hide the URL. The URL has moved to an internal repository. This change depends on the src-internal/DEPS change. The check box is still in the Options page because that check box also controls the captive portal feature. BUG=143327 Review URL: https://chromiumcodereview.appspot.com/10832434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152908 0039d316-1c4b-4281-b951-d872f2087c98
* Move files related to registry-controlled domains into a new ↵pam@chromium.org2012-07-201-1/+1
| | | | | | | | | | | | net/base/registry_controlled_domains/ subdirectory. This includes net/base/registry_controlled_domain.* and net/base/effective_tld_names* BUG=138047 TEST=covered by existing tests Review URL: https://chromiumcodereview.appspot.com/10796033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147641 0039d316-1c4b-4281-b951-d872f2087c98
* Add core plumbing for Instant Extended workdhollowa@chromium.org2012-06-221-0/+25
| | | | | | | | | | | | | | | | | | | | Adds UI model, types, and controller logic. The controller logic is encoded in search_tab_helper.cc/h. The model observer changes are multiplexed from the active tab through the browser's model via search_delegate.h/cc. The primary state in the model is the "mode" which changes depending on interactions with the Omnibox and active URL of the page. This state is communicated from the tab to various "Top Chrome" components such as the toolbar, the tab strip, etc. BUG=133506 TEST=GoogleUtilTest.IsEmbeddedGoogleSearchUrl, SearchDelegateTest.* R=sky@chromium.org, ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10644002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143638 0039d316-1c4b-4281-b951-d872f2087c98