diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2018-07-17 16:43:14 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2018-07-20 12:41:01 +0000 |
commit | 67e6b9e679856975161e85ee8011fac94b59bb22 (patch) | |
tree | 60055bc8340822986efe3c57ce55292cd265c5c8 /src | |
parent | e96f036ac82fd280f1938eaa7a5a8f15fd844325 (diff) |
Update user dir associated to BrowserContext when chaging profile's path
Otherwise, setting a WebEngineProfile to non-off-the-record would assert.
Therefore, now it is safe to set the quicknanobrowser's defaultProfile to
non-off-the-record.
Task-number: QTBUG-69416
Change-Id: I5ca2230e12e457dd9963e386708f2394ae4c8cea
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index a011c2b81..547527e1f 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -70,6 +70,7 @@ #include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_job_factory_impl.h" #include "net/url_request/url_request_intercepting_job_factory.h" +#include "services/file/user_id_map.h" #include "services/network/proxy_service_mojo.h" #include "net/cookie_monster_delegate_qt.h" @@ -566,6 +567,12 @@ void ProfileIODataQt::updateStorageSettings() QMutexLocker lock(&m_mutex); setFullConfiguration(); + std::string userId = content::BrowserContext::GetServiceUserIdFor(m_profile); + if (file::GetUserDirForUserId(userId) != toFilePath(m_profileAdapter->dataPath())) { + file::ForgetServiceUserIdUserDirAssociation(userId); + file::AssociateServiceUserIdWithUserDir(userId, toFilePath(m_profileAdapter->dataPath())); + } + if (!m_updateAllStorage) { m_updateAllStorage = true; // We must create the proxy config service on the UI loop on Linux because it |