summaryrefslogtreecommitdiffstats
path: root/components/bookmarks
Commit message (Collapse)AuthorAgeFilesLines
* Replace usages of DEPRECATED_java_in_dir with java_filesagrieve2016-03-231-1/+1
| | | | | | | | BUG=484854 Review URL: https://codereview.chromium.org/1829823002 Cr-Commit-Position: refs/heads/master@{#382905}
* Remove UnescapeRule::URL_SPECIAL_CHARS from components/mmenke2016-03-231-2/+3
| | | | | | | | | | | | | | | | | | We're removing this, in favor of PATH_SEPARATORS and URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS, to reduce the risk of security issues when unescaping, going forward. All the remaining uses of URL_SPECIAL_CHARS in components/ look safe, so this CL replaces URL_SPECIAL_CHARS with both the new values, maintaining old behavior, except in affiliation_utils.cc, where the behavior clearly serves no purpose, and adding both flags would be confusing. BUG=589257 Review URL: https://codereview.chromium.org/1765993002 Cr-Commit-Position: refs/heads/master@{#382881}
* Add RetainedRef uses where needed.vmpstr2016-03-211-6/+4
| | | | | | | | | | | | | | | This patch adds RetainedRef uses where they are required. These changes will be required when we remove automatic unwrapping of scoped_refptrs in Bind. Please see the bug for more context. R=tzik@chromium.org, thakis@chromium.org, danakj@chromium.org BUG=589048 Review URL: https://codereview.chromium.org/1815363002 Cr-Commit-Position: refs/heads/master@{#382371}
* Use BookmarkBridge instead of ChromeBrowserProvider in the bookmarks widget.newt2016-03-091-1/+1
| | | | | | | | | | | ChromeBrowserProviderClient is deprecated. This replaces its use in the bookmarks widget with BookmarkBridge. BUG=583477 Review URL: https://codereview.chromium.org/1749013002 Cr-Commit-Position: refs/heads/master@{#380187}
* Remove uses of std::unary_function and std::binary_function.vmpstr2016-03-092-11/+4
| | | | | | | | | | | | | | This patch removes unary and binary function, since those are deprecated in C++11. They also only provide two typedefs, so this cleans up some code. In rare cases where the typedefs are actually required, it's easier to just provide the typedef directly instead of deriving from one of these functions. BUG=593407 Review URL: https://codereview.chromium.org/1420333006 Cr-Commit-Position: refs/heads/master@{#380179}
* c/b/ui: allow circular includes from c/btfarina2016-03-021-1/+4
| | | | | | | | | | | | | | Tested on Linux with the following command line: $ gn gen out-gn/Release --args='is_debug=false is_component_build=false symbol_level=1' $ gn check out-gn/Release //chrome/browser/ui:ui BUG=367595,376000 TEST=see above R=dpranke@chromium.org,brettw@chromium.org,sky@chromium.org Review URL: https://codereview.chromium.org/1730643002 Cr-Commit-Position: refs/heads/master@{#378803}
* Customized folder name for ManagedBookmarks policy.isandrk2016-02-297-3/+40
| | | | | | | | | | | | Folder name may be specified by adding {"toplevel_name": "some name"} list item. TEST=manually tested BUG=581744 Review URL: https://codereview.chromium.org/1691513003 Cr-Commit-Position: refs/heads/master@{#378208}
* components: Add out-of-line copy ctors for complex classes.vmpstr2016-02-254-0/+9
| | | | | | | | | | | | | | This patch adds out of line copy constructors for classes that our clang-plugin considers heavy. This is an effort to enable copy constructor checks by default. BUG=436357 R=jochen@chromium.org, dcheng@chromium.org, thakis@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1728033002 Cr-Commit-Position: refs/heads/master@{#377717}
* Remove size_ts from IPC files.jam2016-02-091-9/+9
| | | | | | | | | | | | | This is because size_t's size depends on the architecture. We need IPCs to match as we're now going to support 32 and 64 bit processes communicating on Android. This is split off from https://codereview.chromium.org/1619363002/. BUG=581409 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1673103002 Cr-Commit-Position: refs/heads/master@{#374241}
* Delete base/prefs and update callers to use components.brettw2016-02-037-8/+9
| | | | | | | | | | | | | | | | | | | | | | | Deletes the forwarding headers in base/prefs. Updates the remaining users of base/prefs includes to use components/prefs. Sort headers in updated files. Move PrefServiceFactory out of the base namespace. Update users. Update all preprocessor stuff in components/prefs to change BASE_PREFS_ to COMPONENTS_PREFS_. Add components/prefs to DEPS file of directories where checkdeps fails after the update. BUG=583034 Reland of http://crrev.com/1662523004#ps40001 with fix. TBR=estade@chromium.org Review URL: https://codereview.chromium.org/1668463002 Cr-Commit-Position: refs/heads/master@{#373197}
* Revert of Delete base/prefs and update callers to use components. (patchset ↵msw2016-02-037-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #3 id:40001 of https://codereview.chromium.org/1662523004/ ) Reason for revert: Broke Win Builder compile: https://build.chromium.org/p/chromium.win/builders/Win%20Builder/builds/19463/steps/compile/logs/stdio Original issue's description: > Delete base/prefs and update callers to use components. > > Deletes the forwarding headers in base/prefs. > > Updates the remaining users of base/prefs includes to use components/prefs. > Sort headers in updated files. > > Move PrefServiceFactory out of the base namespace. Update users. > > Update all preprocessor stuff in components/prefs to change BASE_PREFS_ to > COMPONENTS_PREFS_. > > Add components/prefs to DEPS file of directories where checkdeps fails after > the update. > > BUG=583034 > > Committed: https://crrev.com/1f5feb7e317e3c257090858e950273b64a2e31ef > Cr-Commit-Position: refs/heads/master@{#373105} TBR=estade@chromium.org,brettw@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=583034 Review URL: https://codereview.chromium.org/1662843002 Cr-Commit-Position: refs/heads/master@{#373115}
* Delete base/prefs and update callers to use components.brettw2016-02-037-8/+9
| | | | | | | | | | | | | | | | | | | | | Deletes the forwarding headers in base/prefs. Updates the remaining users of base/prefs includes to use components/prefs. Sort headers in updated files. Move PrefServiceFactory out of the base namespace. Update users. Update all preprocessor stuff in components/prefs to change BASE_PREFS_ to COMPONENTS_PREFS_. Add components/prefs to DEPS file of directories where checkdeps fails after the update. BUG=583034 Review URL: https://codereview.chromium.org/1662523004 Cr-Commit-Position: refs/heads/master@{#373105}
* Change ownership of BookmarkClient.sdefresne2016-02-0113-87/+91
| | | | | | | | | | | | | BookmarkModel now owns the BookmarkClient (there is no real need for BookmarkClient to be a KeyedService). As was found in other components having the client be owned by the service reduce the risk of breaking the componentization. BUG=None Review URL: https://codereview.chromium.org/1586013002 Cr-Commit-Position: refs/heads/master@{#372654}
* Update GN build files for new prefs location.brettw2016-01-302-6/+5
| | | | | | | | | | Updates references from //base:prefs to //components/prefs/ TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1652573002 Cr-Commit-Position: refs/heads/master@{#372540}
* Convert Pass()→std::move() in //components/[a-m]*dcheng2015-12-267-20/+26
| | | | | | | | | | BUG=557422 R=avi@chromium.org TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1548193002 Cr-Commit-Position: refs/heads/master@{#366906}
* Switch to standard integer types in components/, part 1 of 4.avi2015-12-2530-57/+109
| | | | | | | | | BUG=138542 TBR=blundell@chromium.org Review URL: https://codereview.chromium.org/1546143002 Cr-Commit-Position: refs/heads/master@{#366873}
* Switch to standard integer types in base/strings/.avi2015-12-251-0/+1
| | | | | | | | | | BUG=138542 TBR=mark@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1548993002 Cr-Commit-Position: refs/heads/master@{#366860}
* Cleanup: Convert const char* kFoo to const char kFoo[].thestig2015-12-174-36/+37
| | | | | | | | | | Or change them to const char* const kFoo. TBR=cpu@chromium.org Review URL: https://codereview.chromium.org/924793003 Cr-Commit-Position: refs/heads/master@{#365692}
* bookmarks: don't collapse whitespace in typed titlesellyjones2015-11-162-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Don't collapse whitespace when bookmarks are added. Since we already collapse whitespace in page titles, the only time this logic had any effect was when the user deliberately added leading or trailing whitespace; in that case we shouldn't second-guess the user. BUG=541001 TEST=adhoc Create a test page whose title has leading and trailing whitespace. Navigate to it. Add a bookmark by right-clicking the bookmark bar and hitting Add Page... Click save. Observe that the bookmark has the whitespace in the title stripped. Delete that bookmark. Add a bookmark again, but this time type " foo " over the "Name" field. Click save. Observe that the bookmark has the leading and trailing whitespace preserved. This is the new behavior. Mouse over the bookmark. Observe that the tooltip preserves the leading and trailing whitespace. Right-click that bookmark and click "Edit...". Type " bar " over the "Name" field. Click save. Observe that the bookmark has the leading and trailing whitespace preserved. Mouse over the bookmark. Observe that the tooltip preserves the leading and trailing whitespace. Right-click that bookmark and click "Edit...". Clear the "Name" field. Click save. Observe that the bookmark has no name. Mouse over the bookmark. Observe that the tooltip has no name displayed. Review URL: https://codereview.chromium.org/1402533002 Cr-Commit-Position: refs/heads/master@{#359837}
* Move components/startup_metric_utils/* to ↵fdoray2015-11-092-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | components/startup_metric_utils/browser/*. This CL first landed as revision 357702. It was reverted because of an XP-only perf regression (crbug.com/551690). After discussion with jschuh@, it was decided that this regression can be ignored. We are working on new startup metrics that require sending IPCs from the renderer to the browser. The message definitions will live in components/startup_metric_utils/common/*, while the code that receives IPCs and logs UMA metrics will live in components/startup_metric_utils/browser/*. As a first step towards implementing these new metrics, this CL moves existing code from components/startup_metric_utils/* to components/startup_metric_utils/browser/*. BUG=547794 Review URL: https://codereview.chromium.org/1413153010 Cr-Commit-Position: refs/heads/master@{#358636}
* Revert of Move components/startup_metric_utils/* to ↵fdoray2015-11-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | components/startup_metric_utils/browser/*. (patchset #5 id:80001 of https://codereview.chromium.org/1413153010/ ) Reason for revert: We suspect that this CL is responsible for a 7.1%-7.7% regression in startup.warm.blank_page (crbug.com/551690) Original issue's description: > Move components/startup_metric_utils/* to components/startup_metric_utils/browser/*. > > We are working on new startup metrics that require sending IPCs from > the renderer to the browser. The message definitions will live in > components/startup_metric_utils/common/*, while the code that receives > IPCs and logs UMA metrics will live in > components/startup_metric_utils/browser/*. > > As a first step towards implementing these new metrics, this CL moves > existing code from components/startup_metric_utils/* to > components/startup_metric_utils/browser/*. > > BUG=547794 > > Committed: https://crrev.com/055d3862641a91e4a5ff2a49bd5d0f835f0436d1 > Cr-Commit-Position: refs/heads/master@{#357702} TBR=gab@chromium.org,sky@chromium.org,caitkp@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=551690 Review URL: https://codereview.chromium.org/1431053003 Cr-Commit-Position: refs/heads/master@{#358278}
* GN: Remove "outputs" parameter for java_cpp_enum()agrieve2015-11-041-3/+0
| | | | | | | | | | This is strictly a simplification refactor. BUG= Review URL: https://codereview.chromium.org/1428173002 Cr-Commit-Position: refs/heads/master@{#357831}
* Move components/startup_metric_utils/* to ↵fdoray2015-11-042-2/+0
| | | | | | | | | | | | | | | | | | | | components/startup_metric_utils/browser/*. We are working on new startup metrics that require sending IPCs from the renderer to the browser. The message definitions will live in components/startup_metric_utils/common/*, while the code that receives IPCs and logs UMA metrics will live in components/startup_metric_utils/browser/*. As a first step towards implementing these new metrics, this CL moves existing code from components/startup_metric_utils/* to components/startup_metric_utils/browser/*. BUG=547794 Review URL: https://codereview.chromium.org/1413153010 Cr-Commit-Position: refs/heads/master@{#357702}
* bookmarks: Remove bookmarks:: prefix where it is not needed.tfarina2015-11-034-35/+29
| | | | | | | | | | | | These types in these files are all already in the bookmarks namespace and thus we don't need to add bookmarks:: to them. BUG=None R=sky@chromium.org Review URL: https://codereview.chromium.org/1415093007 Cr-Commit-Position: refs/heads/master@{#357591}
* Make ValueDeserializer::Deserialize return scoped_ptrolli.raula2015-10-163-4/+4
| | | | | | | | | | | | Make ValueDeserializer::Deserialize return scoped_ptr as almost all consumers already use scoped_ptr and it is also better way to do it. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/1394993004 Cr-Commit-Position: refs/heads/master@{#354458}
* Supporting undoing bookmark deletion without creating new ID.jianli2015-10-096-14/+235
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1379983002 Cr-Commit-Position: refs/heads/master@{#353408}
* Support null callbacks in BookmarkLoadDetails::LoadExtraNodes().sdefresne2015-10-011-1/+2
| | | | | | | | | | | | When building without policy support ("configuration_policy" is 0) there will be no extra nodes to load and the load_extra_callback_ will be null. Add support for this case. BUG=None Review URL: https://codereview.chromium.org/1376233004 Cr-Commit-Position: refs/heads/master@{#351818}
* Log the failure to create a nomarlizerjshin2015-09-211-1/+9
| | | | | | | | | | | | | | The factory method for ICU normalizer should not fail unless the ICU data is not loaded or it's OOM. Log the failure with an error name to see what's going on in crash report. BUG=506487 TEST=None; crash report from Android with an ICU error recorded in the log when normalizer fails to be created. Review URL: https://codereview.chromium.org/1340143002 Cr-Commit-Position: refs/heads/master@{#350042}
* bookmarks: Update OSExhangeData::CustomFormat to Clipboard::FormatType.tfarina2015-09-012-9/+14
| | | | | | | | | | | | CustomFormat is just a typedef to FormatType and this helps fixes the TODO to update it. BUG=NONE R=sky@chromium.org Review URL: https://codereview.chromium.org/1322683002 Cr-Commit-Position: refs/heads/master@{#346664}
* Sync more GN unit tests with GYP.brettw2015-08-211-0/+4
| | | | | | | | | | | | | | | This adds about 600 more tests. Tests added: invalidation, navigation interception, feedback, search, sync driver, enhanced bookmarks, search engines, sessions, data reduction proxy, favicon, constrained window, autofill, metrics, keyed service, bookmarks, suggestions, audio modem I renamed ui_zoom to "zoom" according to GN style. I tweaked some jingle public dependencies so the right include directories get forwarded along with the corresponding uses in the headers. Reland of http://crrev.com/1301743003 TBR=dpranke@chromium.org Review URL: https://codereview.chromium.org/1304163005 Cr-Commit-Position: refs/heads/master@{#344874}
* Revert of Sync more GN unit tests with GYP. (patchset #3 id:40001 of ↵nasko2015-08-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1301743003/ ) Reason for revert: This has broken the GN builds. Windows is failing compilation and Mac is failing generate_build_files. http://build.chromium.org/p/chromium.mac/builders/Mac%20GN/builds/15185/steps/generate_build_files/logs/stdio http://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/5562/steps/compile/logs/stdio Original issue's description: > Sync more GN unit tests with GYP. > > This adds about 600 more tests. > > Tests added: invalidation, navigation interception, feedback, search, sync driver, enhanced bookmarks, search engines, sessions, data reduction proxy, favicon, constrained window, autofill, metrics, keyed service, bookmarks, suggestions, audio modem > > I renamed ui_zoom to "zoom" according to GN style. I tweaked some jingle public dependencies so the right include directories get forwarded along with the corresponding uses in the headers. > > BUG= > R=dpranke@chromium.org > > Committed: https://chromium.googlesource.com/chromium/src/+/a7cde4bd39dc814952d885e54eee33ffdac1a881 TBR=dpranke@chromium.org,thestig@chromium.org,msramek@chromium.org,brettw@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1306153002 Cr-Commit-Position: refs/heads/master@{#344760}
* Sync more GN unit tests with GYP.Brett Wilson2015-08-201-0/+4
| | | | | | | | | | | | | | | This adds about 600 more tests. Tests added: invalidation, navigation interception, feedback, search, sync driver, enhanced bookmarks, search engines, sessions, data reduction proxy, favicon, constrained window, autofill, metrics, keyed service, bookmarks, suggestions, audio modem I renamed ui_zoom to "zoom" according to GN style. I tweaked some jingle public dependencies so the right include directories get forwarded along with the corresponding uses in the headers. BUG= R=dpranke@chromium.org Review URL: https://codereview.chromium.org/1301743003 . Cr-Commit-Position: refs/heads/master@{#344577}
* Deferring creation of Bookmark.bak until first write.cmumford2015-08-184-3/+48
| | | | | | | | | BUG=514730 R=sky@chromium.org Review URL: https://codereview.chromium.org/1279883002 Cr-Commit-Position: refs/heads/master@{#343951}
* Move net::FormatUrl and friends outside of //net and into //componentsrsleevi2015-08-074-18/+21
| | | | | | | | | | | | | | | | | | | | | net::FormatUrl and related are specifically concerned with display policies of URLs, which is not something that //net needs to be aware of, as that's a UX question. This folds in net::FormatURL along with the existing //components/url_fixer and //components/secure_display into a common component, //components/url_formatter, that handles reformatting URLs for user-friendly or data storage (url_formatter), for use in security prompts (elide_url), or for reformatting URLs from user input (url_fixer) (Disabling presubmit since this is intentionally not fixing a legacy API, just moving it for future cleanups) BUG=486979 NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1171333003 Cr-Commit-Position: refs/heads/master@{#342445}
* Cleanup nits in ImportantFileWriter and JsonPrefStore.thestig2015-08-061-3/+4
| | | | | | Review URL: https://codereview.chromium.org/1265363002 Cr-Commit-Position: refs/heads/master@{#342207}
* Revert of Move net::FormatUrl and friends outside of //net and into ↵jochen2015-08-044-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | //components (patchset #16 id:290001 of https://codereview.chromium.org/1171333003/ ) Reason for revert: breaks gn_check on Android: https://build.chromium.org/p/chromium.linux/builders/Android%20GN/builds/28796/steps/gn_check/logs/stdio Original issue's description: > Move net::FormatUrl and friends outside of //net and into //components > > net::FormatUrl and related are specifically concerned with display > policies of URLs, which is not something that //net needs to be aware > of, as that's a UX question. > > This folds in net::FormatURL along with the existing //components/url_fixer > and //components/secure_display into a common component, > //components/url_formatter, that handles reformatting URLs for user-friendly > or data storage (url_formatter), for use in security prompts (elide_url), > or for reformatting URLs from user input (url_fixer) > > (Disabling presubmit since this is intentionally not fixing a legacy API, just moving it for future cleanups) > > BUG=486979 > NOPRESUBMIT=true > > Committed: https://crrev.com/1659865c3eb47166c82378bb840801135b057a09 > Cr-Commit-Position: refs/heads/master@{#341605} TBR=droger@chromium.org,jam@chromium.org,mkwst@chromium.org,pkasting@chromium.org,sky@chromium.org,stuartmorgan@chromium.org,felt@chromium.org,rsleevi@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=486979 Review URL: https://codereview.chromium.org/1260033005 Cr-Commit-Position: refs/heads/master@{#341691}
* Move net::FormatUrl and friends outside of //net and into //componentsrsleevi2015-08-034-18/+21
| | | | | | | | | | | | | | | | | | | | | net::FormatUrl and related are specifically concerned with display policies of URLs, which is not something that //net needs to be aware of, as that's a UX question. This folds in net::FormatURL along with the existing //components/url_fixer and //components/secure_display into a common component, //components/url_formatter, that handles reformatting URLs for user-friendly or data storage (url_formatter), for use in security prompts (elide_url), or for reformatting URLs from user input (url_fixer) (Disabling presubmit since this is intentionally not fixing a legacy API, just moving it for future cleanups) BUG=486979 NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1171333003 Cr-Commit-Position: refs/heads/master@{#341605}
* Move JNI annotations to annotations package.aurimas2015-07-301-1/+1
| | | | | | | | | | | | | The rest of the annotations already live in this package, so this CL moves CalledByNative, NativeCall, JNIAdditionalImport, NativeClassQualifiedName and JNINamespace to the same package. BUG=None TBR=armansito@chromium.org,asvitkine@chromium.org,atwilson@chromium.org,avayvod@chromium.org,bauerb@chromium.org,boliu@chromium.org,brettw@chromium.org,dtrainor@chromium.org,gunsch@chromium.org,lambroslambrou@chromium.org,mef@chromium.org,mnaganov@chromium.org,mnissler@chromium.org,peter@chromium.org,qinmin@chromium.org,sky@chromium.org,yfriedman@chromium.org,yukawa@chromium.org,zea@chromium.org Review URL: https://codereview.chromium.org/1263053002 Cr-Commit-Position: refs/heads/master@{#341175}
* Add utilities to remove duplication in BookmarkClient implementations.sdefresne2015-07-293-0/+58
| | | | | | | | | | | | Add utility free functions to //components/bookmarks/managed and //components/favicon/core to share common code between both BookmarkClient implementations (desktop and iOS). BUG=514208 Review URL: https://codereview.chromium.org/1262123002 Cr-Commit-Position: refs/heads/master@{#340912}
* Update SplitString calls in componentsbrettw2015-07-232-19/+24
| | | | | | | | This converts calls from the old form to the new form. Some calls that iterated over the results were changed to a range-based for loop with an inline call to SplitString. Some places were changed to use StringPieces when it was safe to do so. Review URL: https://codereview.chromium.org/1234973004 Cr-Commit-Position: refs/heads/master@{#340209}
* Fix componentization of chrome/browser/bookmarkssdefresne2015-07-213-0/+288
| | | | | | | | | | | | | | | | | | | | Add new class ManagedBookmarkService into //components/bookmarks/managed responsible for managed and supervised bookmarks creation and policy enforcement. BookmarkClient delegates policy decisions to ManagedBookmarkService (and use sane default if there is no ManagedBookmarkService instance). Remove all direct access to ChromeBookmarkClient and instead direct queries to ManagedBookmarkService. Move prefs registration to a static method of BookmarkModel so that iOS can reuse it. BUG=383583,359565 Review URL: https://codereview.chromium.org/1233673002 Cr-Commit-Position: refs/heads/master@{#339639}
* Componentize pref registration in BookmarkModelFactorysdefresne2015-07-201-0/+8
| | | | | | | | | | | | | | | | | Move pref registration from BookmarkModelFactory to the bookmarks component so that the code can be shared with iOS. Move the registration to the bookmarks::RegisterProfilePrefs() static free function and call it from BookmarkModelFactory instead of the global RegisterProfilePrefs (both are called at Profile creation time but putting the code in the factory reduce complexity of that global function). BUG=359565 Review URL: https://codereview.chromium.org/1235983006 Cr-Commit-Position: refs/heads/master@{#339466}
* Fix ProfilePolicyConnector getters for device-local accounts.emaxx2015-07-141-1/+7
| | | | | | | | | | | Add support for device-local accounts into ProfilePolicyConnector getter methods: IsManaged(), GetManagementDomain(), IsPolicyFromCloudPolicy(). BUG=502309 Review URL: https://codereview.chromium.org/1204053004 Cr-Commit-Position: refs/heads/master@{#338683}
* Update all bookmarks which use an icon URL when a favicon's bitmap is updatedpkotwicz2015-07-095-15/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL causes two different types of notifications to be dispatched when favicon data is changed in the database: Type 1: The page URL <-> icon URL mapping has changed. e.g. http://www.google.com changed from using http://www.google.com/favicon1.ico to using http://www.google.com/favicon2.ico Type 2: The favicon bitmap data for an icon URL has changed. e.g. a webmaster replaced http://www.google.com/favicon1.ico with a new version An update to the favicon database can cause either one type of notification or both types of notifications to be dispatched. Example Scenario: 1) A Google webmaster has updated http://www.google.com/favicon1.ico 2) A user has http://www.google.com bookmarked 3) A user visits http://www.google.com/searchresults Both http://www.google.com and http://www.google.com/searchresults use http://www.google.com/favicon1.ico Old Behavior: The favicon update which occurs in step #3 causes a notification to be sent with an incomplete list of page URLs for which the favicon has changed. A notification is sent for http://www.google.com/searchresults but not for http://www.google.com even though both pages use the same icon URL. As a consequence of no notification being sent for http://www.google.com: - The favicon for the http://www.google.com bookmark is not updated - If a user is logged into sync, sync reverts the favicon for http://www.google.com/favicon1.ico to the old version when Chrome is restarted New Behavior: A "Type 2 notification" is dispatched indicating that the favicon at http://www.google.com/favicon1.ico has changed. This allows the BookmarkModel to refetch the favicons for all the bookmarks which use http://www.google.com/favicon1.ico, namely the http://www.google.com bookmark. The favicon for http://www.google.com/favicon1.ico is not reverted to an old version when Chrome is restarted This bug can be fixed by passing to the BookmarkModel a list of all of the page URLs which use http://www.google.com/favicon1.ico in step #3. This is impractical because the subset of pages that the user visited which use a given icon URL is usually much larger than the subset of bookmarked pages which use a given icon URL. BUG=485657 TEST=HistoryBackendTest.* TwoClientBookmarksSyncTest.SC_SetFaviconTwoBookmarksSameIconURL BookmarkModelTest.* Review URL: https://codereview.chromium.org/1133463005 Cr-Commit-Position: refs/heads/master@{#338054}
* Fix gn check errors for bookmarks component with OS=androidagrieve2015-07-081-1/+2
| | | | | | | | | | | | | | | | | | | | If you run the following command line, you will get errors like this: $ gn check ERROR at //components/bookmarks/common/android/bookmark_id.h:10:11: Include not allowed. ^----------------------------- It is not in any dependency of //components/bookmarks/common/android:android The include file is in the target(s): //base:base which should somehow be reachable. BUG=502447,367595 Review URL: https://codereview.chromium.org/1211303010 Cr-Commit-Position: refs/heads/master@{#337720}
* bookmarks: Remove includes of basictypes.h.tfarina2015-07-0311-40/+39
| | | | | | | | | | | | | | We can just use the standard integer types from stdint.h now that our supported toolchain supports it and for the DISALLOW_COPY_AND_ASSIGN macro variants we should just include base/macros.h instead. BUG=138542 TEST=components_unittests R=sky@chromium.org Review URL: https://codereview.chromium.org/1220813007 Cr-Commit-Position: refs/heads/master@{#337320}
* Fix some case-insensitive cases for StartsWith.brettw2015-07-011-1/+4
| | | | | | | | | | | | | | | | | | This is not all callers so the old function is not deleted. Most calls are replaced with either StartsWith with the enum, or StartsWith(base::i18n::ToLower(...) for cases that need truely-internationalized case comparison (or when I wasn't sure). The most interesting case is chrome/installer/util which can't depend on base/i18n and it wants Unicode case-insensitive compares. I replaced these with a call to the Win32 function CompareString Add a missing protobuf dependency in components/storage_monitor that a try run turned up. In a few cases there is some related cleanup when I touched code: SplitString calls in experiment_labels.cc (which I've been doing patches to update), for loop in gcapi_omaha_experiment.cc, In some cases, a ToLower call was pulled out of a loop as in autofill_agent.cc. From this file I also removed a redundant comparison since the code checked it if was equal or a prefix, and a prefix returns true if it's equal. BUG=506255 Review URL: https://codereview.chromium.org/1220653002 Cr-Commit-Position: refs/heads/master@{#337093}
* bookmarks: Simplify prefs utilization in BookmarkExpandedStateTrackerTest.tfarina2015-06-301-19/+8
| | | | | | | | | | | | | | We can simply use TestingPrefServiceSimple in this test, simplifying how things are set up. BUG=None TEST=python testing/xvfb.py out/Debug/ out/Debug/components_unittests --gtest_filter=BookmarkExpandedStateTrackerTest.* R=sky@chromium.org Review URL: https://codereview.chromium.org/1214863002 Cr-Commit-Position: refs/heads/master@{#336887}
* Remove check whether |BookmarkModel::store_| has been initialized in ↵pkotwicz2015-06-251-4/+0
| | | | | | | | | | | | | | BookmarkModel::OnFaviconChanged() The purpose of this CL is to make testing BookmarkModel::OnFaviconChanged() easier. BUG=485657 TEST=None Review URL: https://codereview.chromium.org/1207603002 Cr-Commit-Position: refs/heads/master@{#336206}
* Fixes unnecessary white spacesky2015-06-251-1/+1
| | | | | | | | | | | | | Happened to noticed this when looking at the file. BUG=none TEST=none R=pkotwicz@chromium.org TBR=pkotwicz@chromium.org Review URL: https://codereview.chromium.org/1210963004 Cr-Commit-Position: refs/heads/master@{#336191}