| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
BUG=
TEST=
Review URL: http://codereview.chromium.org/10061002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133251 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=116952
TEST=TemplateURLServiceTest.*, DefaultSearchProviderChangeTest.*
Review URL: http://codereview.chromium.org/10084017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132980 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should already have been true in non-test code: the keyword editor, the importer, the extension system, and the search engine autodetection code all tried to ensure that the URLs are non-empty. However, because we've seen problems occur, this change tries to sanitize the pref, database, and sync inputs to expunge any bogus entries.
We also fix tests, add some more DCHECKs to make this assertion clearer in some of the TemplateURL-adding paths, and then remove conditionals that checked for empty URLs.
This also cleans up a silly design where TemplateURLService listened for changes to the default search provider prefs -- meaning that anyone who tried to write them wound up calling back to the observer as every single pref was written. This led to reading back bad state. Eliminating this ought to allow for some other cleanups in TemplateURLService, but I haven't tried to make them here.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10014033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132909 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
TabContents -> WebContents in chrome/, part 3.
BUG=105875
TEST=no change
Review URL: https://chromiumcodereview.appspot.com/9969208
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132627 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clients that have UMA enabled.
BUG=123609
TEST=With UMA enabled (not Chromium), visit www.google.com and ensure that the request header includes X-Chrome-UMA-Enabled with value "1". Also, ensure that unit_tests GoogleUtilTests all pass.
Review URL: http://codereview.chromium.org/10054029
TBR=stevet@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10107009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132488 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
UMA enabled.
BUG=123609
TEST=With UMA enabled (not Chromium), visit www.google.com and ensure that the request header includes X-Chrome-UMA-Enabled with value "1". Also, ensure that unit_tests GoogleUtilTests all pass.
Review URL: http://codereview.chromium.org/10054029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132479 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*) On DSE change, new provider is not pushed to Sync.
*) Simplified code in BrowserInit.
BUG=None
TEST=protector.py
Review URL: http://codereview.chromium.org/10065016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132398 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
* The SearchTermsData version now allocates internally, as that's an implementation detail callers don't need to know about.
* The TemplateURLServiceTestUtil version, since it is mimicking the GoogleURLTracker functionality, now takes a GURL to help convey to callers that a valid GURL is required, and so that when the GOOGLE_URL_UPDATED notification is changed to pass along the updated GURL, it will have one available.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10048008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131690 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix indentation
* Slightly more const-correct TemplateURLData functions
* Use EXPECT_XXX() where possible, but ASSERT_XXX() to avoid crashes on expectation failure
* Remove unneeded #include
* Simplify AlternateErrorPageTabObserver slightly by having constructor take a Profile
* Shorter/simpler code
* Fix ordering in some places to be more consistent (e.g. matching member declaration order)
* Add some DCHECK()s to make more explicit some conditions that will become important later
Also, template_url_service.cc has some functional changes:
* GetTemplateURLForXXX() functions now return correct values when asked for the default search URL before the model has successfully loaded. I wound up needing this later to fix some case, but I forget what now; the change seems more correct anyway.
* Similarly, UnregisterExtensionKeyword() now works correctly if called before loading has finished
* RegisterExtensionKeyword() now does nothing when there's already a keyword for that extension, as the comments in the header claim. I'd think this wouldn't actually matter in normal use as I think extension upgrades first unregister the old extension? (I don't remember if I checked that, though)
* Don't try to set an extension keyword as default -- this would be a bad UX as these are inherently async. I don't think this should have been possible anyway except maybe if there was some kind of unintentional overlap between extensions and policy??
* Don't try to save extension keywords to disk or sync them (as the extension system should be responsible for registering them if necessary on startup in both these cases). We already avoided syncing these, I just added checks in more places; I no longer recall if we had code to avoid persisting these to disk, I don't seem to see any at the moment. (sky?)
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10033017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131619 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TemplateURLData. This allows us to eliminate the TemplateURL NULL constructor, most public non-const TemplateURL functions, and most TemplateURL friend declarations.
This is also a necessary precursor to changing TemplateURLService's APIs to convert most "const TemplateURL*" cases to "TemplateURL*", which I'll explain once I actually make the change.
There is some awkwardness here around keywords, as keyword autogeneration requires a TemplateURL but the state bits are kept on TemplateURLData. This will go away in the future when I remove keyword autogeneration from TemplateURL entirely.
This differs from r131019 in that it fixes a memory error in chrome/browser/search_engines/util.cc:MergeEnginesFromPrepopulateData() where when we updated the vector to contain a new TemplateURL*, we didn't also update |default_search_engine| to point at the new URL if necessary.
BUG=none
TEST=none
TBR=sky,mnissler,atwilson
Review URL: https://chromiumcodereview.appspot.com/10021008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131224 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate the TemplateURL NULL constructor, most public non-const TemplateURL functions, and most TemplateURL friend declarations.
This is also a necessary precursor to changing TemplateURLService's APIs to convert most "const TemplateURL*" cases to "TemplateURL*", which I'll explain once I actually make the change.
There is some awkwardness here around keywords, as keyword autogeneration requires a TemplateURL but the state bits are kept on TemplateURLData. This will go away in the future when I remove keyword autogeneration from TemplateURL entirely.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9982018
TBR=pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9949059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131158 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
engine after keywords are loaded.
Also, added CHECKs and UMA that the default search engine is not removed.
BUG=116952
TEST=TemplateURLServiceTest.DefaultSearchProviderLoadedFromPrefs; manual: remove default search in Wen Data, launch Chrome: there should be a default search
Review URL: http://codereview.chromium.org/9960007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131122 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes the Chrome Official win builder.
BUG=none
TEST=none
TBR=pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10007029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131059 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allows us to eliminate the TemplateURL NULL constructor, most public non-const TemplateURL functions, and most TemplateURL friend declarations.
This is also a necessary precursor to changing TemplateURLService's APIs to convert most "const TemplateURL*" cases to "TemplateURL*", which I'll explain once I actually make the change.
There is some awkwardness here around keywords, as keyword autogeneration requires a TemplateURL but the state bits are kept on TemplateURLData. This will go away in the future when I remove keyword autogeneration from TemplateURL entirely.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9982018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131019 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TemplateURL. This will make it easier to move the data members of TemplateURL into a new class later.
This changes the accessors for TemplateURL's TemplateURLRefs. There are now separate accessors for the URLs as strings and as TemplateURLRefs, and the latter have changed to returning a const ref, meaning they no longer return NULL when the corresponding URL string is empty. This makes a number of callers clearer.
This differs from r130431 only by including changes to fix the compile on official builds, which enable some #ifdefs that guarded additional points that needed migrating.
BUG=none
TEST=none
TBR=sky,mnissler,atwilson
Review URL: https://chromiumcodereview.appspot.com/9960016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130660 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TemplateURL. This will make it easier to move the data members of TemplateURL into a new class later.
This changes the accessors for TemplateURL's TemplateURLRefs. There are now separate accessors for the URLs as strings and as TemplateURLRefs, and the latter have changed to returning a const ref, meaning they no longer return NULL when the corresponding URL string is empty. This makes a number of callers clearer.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9968016
TBR=pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9965143
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130566 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
will make it easier to move the data members of TemplateURL into a new class later.
This changes the accessors for TemplateURL's TemplateURLRefs. There are now separate accessors for the URLs as strings and as TemplateURLRefs, and the latter have changed to returning a const ref, meaning they no longer return NULL when the corresponding URL string is empty. This makes a number of callers clearer.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9968016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130431 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=120992
TEST=no new ones, existing ones updated
Review URL: http://codereview.chromium.org/9969021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130341 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change adds a ENABLE_PROTECTOR_SERVICE condition to exclude
ProtectorService and related code. I have introduced protector_utils.h which
contains methods used by keyword_table.cc to sign and verify keywords.
Note: ChromeOS also excludes protector from the tests
(chrome_tests.gypi), but disables ProtectorService using a command line
switch.
BUG=117407
TEST=
Review URL: http://codereview.chromium.org/9863047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129910 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This in turn allows us to avoid passing in TemplateURLs to a few other APIs, and will be critical later when adding Profile*s and keeping URL strings on the owner.
This also moves some definitions in template_url.cc around to match declaration order, and makes the TemplateURL::SupportsReplacement() family of functions non-static.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9930002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129864 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
actually meaningfully set by the browser:
* TemplateURLRef: |index_offset_|, |page_offset_|
* TemplateURL: |description_|, |languages_|
Also remove TemplateURL::ImageRef and the |image_refs_| field and replace with a simple GURL |favicon_url_|. We only used the vector inside the parser, and we ended up only caring about a single favicon-sized, appropriately-typed image, so just move those conditions into the parser and simplify everyone else.
Finally, convert a number of pass-or-return-by-value functions in template_url_h to use const refs.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9917001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129682 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
omnibox's google suggest feature (a.k.a. referred to as "prediction service" in the setting page).
This change:
Creates the omnibox suggest field trial with 20 groups.
Sends suggest/search requests to google with a CGI parameter (sugexp=chrome,mod=NUM) that indicates which group the user is assigned to.
Drops a beacon in the UMA logs (for opted-in users) to identify the experiment group the user is in.
BUG=
TEST=by hand, using wireshark to capture outgoing HTTP requests
Review URL: http://codereview.chromium.org/9794002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129181 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL conceptually does several things (most of them just one line).
1. Roll RLZ 105:118
106: Fix "expression result unused" warning caused by VERIFY() use.
107: rlz: Add an implementation of PingServer() that uses chrome's net stack.
108: Implement RlzValueStoreMac.
109: Move GetMachineId() to its own file. No intended behavior change.
110: Implement GetSystemTimeAsInt64() on mac.
111: Minor cleanups.
112: Don't pay a static initializer for expected_assertion_ when it's not used.
113: Rename rlz_lib2.cc and win/lib/rlz_lib.cc to win/lib/rlz_lib_win.cc
114: mac: Implement GetMachineId().
115: mac: Implement the locking part of ScopedRlzValueStoreLock.
116: Tweaks to make the use of chrome's net stack forceable through gyp.
117: Push RLZ_NETWORK_IMPLEMENTATION_ define to dependent targets.
118: Use base::mac::ScopedNSAutorleasePool only on mac.
2. Change rlz.cpp to use the blocking pool instead of the file thread.
3. Enable on mac.
4. Switch to chrome's network stack on windows
5. Switch RlzSendFinancialPingFunction to be an AsyncExtensionFunction
that calls SendFinancialPing on a worker thread. This is required because
extension functions run with a MessageLoop, so the MessageLoop in
SendFinancialPing in rlz would trigger an assert (and making that inner
loop nestable seems like a very bad idea). This change also removes
one instance of ScopedAllowIO and fixes a TODO.
BUG=46579
TEST=
1.) Do an official chrome build
2.) Add gratuitous logging in rlz.cc and other places and check that by default:
* The channel is reported as "stable"
* The brand code is the empty string
* This brand code counts as organic install
* RLZ exits early.
3.) Create ~/Library/Google/Google\ Chrome\ Brand.plist and add e.g. the string "BRAND" for key KSBrandID, restart chrome.
* Brand code is now "BRAND" (this depends on Chrome's Info.plist not having a KSBrandID key, which has precedence. Currently our Chromes seem to never have this key.)
* A ping is scheduled, but nothing is sent.
* Use the omnibox a little, which causes product events to be recorded.
4.) Restart chrome yet again, wait a bit.
* Logging in "SendFinancialPing()" should print:
pinging http://clients1.google.com:80/tools/pso/ping?as=chrome&brand=BRAND&pid=&hl=en&events=C1F,C1S&rep=2&rlz=C1:1C1_____enUS476,C2:1C2_____enUS476&id=0926C138C2EA77A791CB450D322D0183E5A8079300000001B5
ping completed!
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/9699054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129028 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The UIDataTypeController now uses a SharedChangeProcessor, and passes a ref
to the SyncableService's. Every SyncableService now owns its own change
processor. Additionally, we use the ScopedPtr::Pass semantics for passing
around SyncChangeProcessors to ensure SyncableServices properly take
ownership.
This, along with all the test updates it requires (most of the patch) fixes
several leaks introduced in the previous patch to remove the Syncable Service
Adapter. SyncableServiceMock is removed as it didn't play nice with
scoped_ptr parameters (and was hardly used).
BUG=117098,117538
TEST=unit_tests with valgrind/drmemory/heapcheck
TBR=georgy@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9749012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128578 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Non-functional changes:
* 0 -> TemplateURLRef::NO_SUGGESTIONS_AVAILABLE
* GURL x = GURL(...) -> GURL x(...)
* Infobar -> InfoBar
* AllSources -> AllBrowserContextsAndSources
* Pass a Profile* to SearchProviderInstallData, which it will need for more purposes once UIThreadSearchTermsData takes a Profile*
* Add/modify comments
* "" -> std::string()
* Other trivial changes to minimize diffs
Functional changes:
* TemplateURLFetcher::RequestDelegate::AddSearchProvider() no longer clears the keyword for a newly-added, explicitly-requested TemplateURL that conflicts with a non-replaceable keyword. This means the conflicting keyword will appear in the dialog box and the box will indicate a conflict. This is mostly to avoid giving a TemplateURL an empty keyword, which will later be made illegal.
* TemplateURLFetcher::ScheduleDownload() now expects the provided keyword to be non-NULL for autodetected cases (which was always true already) and ignores the keyword for explicit cases (which only matters to tests, as the actual browser code always passed an empty keyword here anyway).
* TemplateURLService::CanReplaceKeyword() now always sets its outparam. This prevents any possible use-without-set on the caller side.
* Properly order (expected, actual)
* ASSERT -> EXPECT
* Construct the TemplateURL for TemplateURLTableModel::Add() in that function rather than the caller. This will make it easier to change TemplateURLs to require a Profile* later.
* Check all fields at the end of WebDatabaseMigrationTest.MigrateVersion27ToCurrent
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9811022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128270 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change signature to return an allocated TemplateURL* instead of requiring callers to create one and then returning a bool. This will make it easier to modify how TemplateURLs are created later, and also simplifies callers a bit.
* Remove TemplateURL::add_language() as all callers are already friends and can do this directly.
* Generate a keyword for the TemplateURL inside the parser itself. This will become mandatory later when keywords become non-optional.
* Take a Profile* in the parser constructor. This is currently unused, I'll use it later and was lazy enough to not want to add the diffs of plumbing it later :)
* Make Parse() take char* instead of unsigned char* to avoid silly reinterpret_casts on both sides of the call.
* Now that most of the parsing code is in TemplateURLParsingContext member functions, eliminate a lot of now-unnecessary accessor functions and helpers by inlining them, and take advantage of "friend of TemplateURL" status.
* Style fixes, e.g. "type *name" -> "type* name".
* Shorten.
* Deinline functions in unittest helper class or rename them in unix_hacker() style.
* Add some ASSERT_NO_FATAL_FAILURE()s.
* Special-case an edge (that I am not sure can happen) in TemplateURLService::GenerateKeyword() in order to guarantee that callers with a valid URL and |autodetected| set to false will always get a non-empty keyword. (Later this function will be condensed more so that it guarantees non-empty keywords in all cases, by expecting callers to handle the exceptions before calling it.)
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9728010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127613 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This de-inlines the functions in TemplateURLParsingContext, moves some formerly-file-static functions into TemplateURLParsingContext, and in general reorders things to make subsequent diffs at all comprehensible.
All the functions are left with the same implementations and names, so there should be no functional change. In some cases this meant that newly-part-of-TemplateURLParsingContext functions are static and take a TemplateURLParsingContext*; they will be made non-static later. The goal of this change is to be rubber-stampable.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9720017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127503 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fix a few minor issues that the compiler complains about on mac, mostly
wstring/string16 confusion. All these changes are no-ops on windows.
95: Move SupplementaryBranding from win/lib/rlz_lib.h to lib/rlz_lib.h
96: Move ClearAllProductEvents() to use RlzValueStore.
97: Move ClearAllProductEvents() to shared code. Pure code move.
98: Move ClearProductState() to RlzValueStore.
99: Move ClearProductState() to common code.
BUG=46579
TEST=none
TBR=rogerta
Review URL: http://codereview.chromium.org/9717012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127322 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove the notion of SearchEngineType from TemplateURL. It's now solely the domain of the prepopulate data.
* Simplify TemplateURL IPC code.
* Remove TemplateURLRef::SetGoogleBaseURL(), which was an unnecessary passthrough to another public static function.
* Use "google.*"-like strings consistently for Google base URLs in tests; this will become important later when keyword autogeneration changes to depend on the host being a Google URL.
* Define base SearchTermsData::GetApplicationLocale() and GetRlzParameterValue() implementations and remove various similar definitions elsewhere.
* De-inline functions we don't normally inline (constructors, virtuals, etc.).
* Remove some unnecessary TemplateURLRef friend declarations.
* Remove TemplateURL::set_prepopulated() and add_image_ref() manipulators as all callers were already friends or are now. (First of a number of changes that move toward making TemplateURL more immutable so we can then remove "const" from the TemplateURLService APIs.)
* Make TemplateURLRef non-copyable. This required defining explicit copy/assignment operators for TemplateURL.
* Rename template_url_parser.cc:ParsingContext to TemplateURLParsingContext so it can be moved out of the anonymous namespace (necessary to make it a friend elsewhere).
* In template_url_service_sync_unittest.cc, add more CreateTestTemplateURL() overrides so that most creation and manipulation of TemplateURLs now happens in one function. Also rework some functions to create new TemplateURLs instead of modifying existing ones. This will make later refactoring much simpler.
* Fix silly pattern: "GURL x = GURL(...);" -> "GURL x(...);".
* Convert some ASSERTs to EXPECTs and vice-versa to try and match what conditions should really halt a test and what shouldn't.
* Remove other unnecessary passthrough functions, shorten code, rewrap, etc.
* Various other minor changes to reduce future diffs of TemplateURL refactoring patches.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9706087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127226 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous attempts to share code between ProfileKeyedServiceFactory and RefcountedProfileKeyedServiceFactory were ill advised. The core logic code must maintain refcounted data in a scoped_refptr<> for the entire lifecycle, across interface and implementation, preventing any real abstraction here.
This removes the common ProfileKeyedBase and splits the two worlds entirely in two. This has quite a bit of exact code with different types now.
Fallout from this is far reaching:
- Since there isn't one common heiarchy, now the testing methods either return ProfileKeyedServices or scoped_refptr<RefcountedProfileKeyedService>s. This is a lot of change.
- Many consumers handled the refcounted ptrs as raw pointers, which probably isn't a good idea.
- There is now a bunch of code duplication.
BUG=118196,77155
R=mirandac,tim
TBR=jhawkins,sky,scottbyer
Review URL: http://codereview.chromium.org/9703038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127104 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Replace a pair of overlapping functions in the API with two distinct accessors for relevant pieces of information about prepopulated URLs. One key side effect here is that we no longer return TemplateURL*s from these, which will make the upcoming refactoring changes slightly cleaner.
* Make the implementation of these a bit more robust w.r.t. determining if a provided URL corresponds to Google. This will also be important later as we'll want to be able to match a hand-coded "google.co.uk" entry against an auto-generated "google.de" entry (or similar).
* Remove a bunch of string conversions, as well as a lot of passing of raw C-style string pointers.
* Remove using statements.
* Remove two obscure engines which have the same hostname as another, different engine. These cause problems when we ask for the name or type of an engine because the answer we get back is basically indeterminate. I don't think either of these is very important (they lived at slots 4 and 5 in their respective countries) so just gut them.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9705021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126746 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
part of TemplateURL refactoring.
* Exposes some key names so tests can refer to them as named constants
* More pervasive use of string constants to specify column lists
* Introduces a "Keywords" typedef to make changing that type easier later
* Shortened lots of code
* 0 -> kInvalidTemplateURLID
* Eliminated some test redundancy
etc.
Some of the renaming/moving of things isn't terribly compelling in this change but will make my future changes have smaller diffs.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9663039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126465 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move sync .proto files to sync/protocol. Update all references.
This begins the Great Sync Migration.
BUG=117585,43624
TEST=
Review URL: https://chromiumcodereview.appspot.com/9668028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125967 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
As a side effect, requests going through URLFetcher now also have to pass cookie checks. Requests from the URLFetcher can be optionally annotated with a render view, so the user can be notified about blocked cookies. This plumbing is done for the alternate nav url fetcher, and the template url fetcher.
BUG=116322
TEST=manual/pyauto
Review URL: https://chromiumcodereview.appspot.com/9572001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125831 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This also finishes breaking the Chrome dependency on RenderWidgetHostImpl and RenderViewHostImpl.
TBR=jam@chromium.org
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9599011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125166 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
overhead.
Instead, we now use optional fields in EntitySpecifics. Because the tag numbers remain
the same, this is a wire-format compatible change.
This incurs a (#datatypes * sizeof(void*))*#sync_items memory cost, due to storing extra pointers. In practice, for a typical account on windows this amounts to < 200k, and the static init cost is believed to be greater.
Note - upcoming features in protobufs may let us eliminate this extra memory overhead.
Also: The testserver tests were broken on ToT due to a bug in _SaveEntry's saving of mtime which is fixed in this patch.
TBR=yoz@chromium.org
TBR=mnissler@chromium.org
TBR=pkasting@chromium.org
TBR=georgey@chromium.org
BUG=94992, 94925
Review URL: http://codereview.chromium.org/9460047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124912 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting ion=1 overrides google.com preferences, which can be a surprise.
Visible Instant is not such a surprise, since the user can actually see the
previews and thus associate it with Chrome Instant.
BUG=105390
TEST=Start with --instant-field-trial=hidden and observe that the Instant homepage requests don't have ion=1. Turn off Google Instant (using google.com/preferences) and observe that Google Instant remains turned off on an omnibox-initiated search.
Review URL: http://codereview.chromium.org/9581026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=116253
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9545005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124282 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hostname must now be explicitly specified (previously default was 127.0.0.1). See the following CL for further details:
http://codereview.chromium.org/9369029/
A follow-up CL will remove the deprecated constructor:
http://codereview.chromium.org/9431002/
BUG=114369
TEST=everything still compiles and passes
Review URL: http://codereview.chromium.org/9433043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123240 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first of what will be many CLs to add origin-based deletion to
BrowsingDataRemover for all the variety of data types it supports. As a first
step, this CL hides origin-based functionality in the private
`BrowsingDataRemover::RemoveImpl()`. Once we're done with all the relevant data
types, we can add a `RemoveOrigin(int, GURL)` method next to `Remove(int)` to
expose a public API.
BUG=113965
TEST=unit_tests
Review URL: http://codereview.chromium.org/9379008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122497 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Remove lots of duplicated ifdefs, replacing them with syntax that works
on all platforms (including VS2010).
BUG=106215
Review URL: https://chromiumcodereview.appspot.com/8735002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122303 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove IDR_SEARCH_ENGINE_LOGO_*, references, and utilities.
These are unused after deprecating the first run search engine ballot.
Remove EXPLICIT_DEFAULT_PROVIDER, ConfirmSetDefaultSearchProvider, and DefaultSearchView.
These are unused after the fix for Issue 100946.
Followup CL TODOs:
TODO(msw|pkasting): Remove KeywordTable's logo_id column.
TODO(msw): Nix chrome/app/theme/google/chrome/search_*.png
TODO(msw): Nix chrome/app/theme/search_engine_top.png
BUG=113248,38475,100946,108206
TEST=none
Review URL: http://codereview.chromium.org/9373049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122274 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
R=brettw@chromium.org,pkasting@chromium.org,marja@chromium.org
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9388011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121742 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
part that deals with memory storage.
This patch rips apart the dependency tracking parts of ProfileKeyedServiceFactory into a base class. Derived classes from ProfileKeyedBaseFactory now exist to deal with memory management and lifecycle events. ProfileKeyedBase is the most generic thing that can be tracked (it is simply a virtual destructor).
For example, I've created RefcountedKeyedServiceFactory, which derives from ProfileKeyedBaseFactory. Everything tracked via that Factory must be a RefcountedProfileKeyedService. The storage layer uses scoped_refptr<>s in a map instead of normal pointers. This patch converts CookieSettings over (I'm ignoring the rest that could be ported due to how large the patch would be).
Other than some minor changes to the testing interface, this doesn't change ProfileKeyedServiceFactory usage.
BUG=77155
R=mirandac, jochen, sky, jhawkins
TBR=tim
Review URL: http://codereview.chromium.org/9360008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121727 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=
TEST=
Review URL: http://codereview.chromium.org/9348042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121056 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=
TEST=
Review URL: http://codereview.chromium.org/9348039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121049 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Encode searchTerms always. If InputEncoding is given, use it for
encoding. The spec(*) says searchTerms must be URL-encoded.
(*) http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_5#The_.22searchTerms.22_parameter
TemplateURLTest.URLRefTestSearchTerms is revised to follow this change.
BUG=111923
TEST=TemplateURLTest.*
Review URL: http://codereview.chromium.org/9159062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119925 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No changes to the Gtk and Mac first-run (reporting & default browser) dialog.
Tested optionally with GYP_DEFINES="branding=Chrome" and "--first-run --organic".
Chromium (all platforms): Shows the browser window directly (no dialog).
Chrome (Windows): Shows the browser window directly (no dialog).
Chrome (Linux and Mac): Shows the first-run (reporting & default browser) dialog before the browser window.
TODO(msw): Close crbug.com/111062 for removed test.
TODO(msw): Remove search engine icon/image resources (TemplateURL::logo_id_).
BUG=107005
TEST=No more standalone search engine selection dialog/ballot, Gtk and Mac first-run dialog works as before.
Review URL: http://codereview.chromium.org/9285002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119189 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TemplateURL sync code.
Added a helper method to ensure that we leave unsynced fields alone.
Also made a small update to TemplateURLServiceSyncTest to ensure that this this field is now safe from the Sync code.
BUG=111095
TEST=Ensure that unit test TemplateURLServiceSyncTest.ResolveSyncKeywordConflict passes.
Review URL: http://codereview.chromium.org/9160003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119107 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
is removed.
BUG=110870
TEST=browser_tests:DefaultSearchProviderChangeTest.*
Review URL: http://codereview.chromium.org/9283017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118897 0039d316-1c4b-4281-b951-d872f2087c98
|