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

Unified Diff: Source/modules/credentialmanager/LocalCredential.cpp

Issue 1162443006: Credential Management: Rename 'LocalCredential' to 'PasswordCredential' (1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add-type
Patch Set: Test. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/credentialmanager/LocalCredential.cpp
diff --git a/Source/modules/credentialmanager/LocalCredential.cpp b/Source/modules/credentialmanager/LocalCredential.cpp
deleted file mode 100644
index 1dccf397398651c5c657062480c4295b1de24b89..0000000000000000000000000000000000000000
--- a/Source/modules/credentialmanager/LocalCredential.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "modules/credentialmanager/LocalCredential.h"
-
-#include "bindings/core/v8/ExceptionState.h"
-#include "core/html/DOMFormData.h"
-#include "platform/credentialmanager/PlatformLocalCredential.h"
-#include "public/platform/WebCredential.h"
-#include "public/platform/WebLocalCredential.h"
-
-namespace blink {
-
-LocalCredential* LocalCredential::create(WebLocalCredential* webLocalCredential)
-{
- return new LocalCredential(webLocalCredential);
-}
-
-LocalCredential* LocalCredential::create(const String& id, const String& password, const String& name, const String& avatar, ExceptionState& exceptionState)
-{
- KURL avatarURL = parseStringAsURL(avatar, exceptionState);
- if (exceptionState.hadException())
- return nullptr;
- return new LocalCredential(id, password, name, avatarURL);
-}
-
-LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential)
- : Credential(webLocalCredential->platformCredential())
-{
-}
-
-LocalCredential::LocalCredential(const String& id, const String& password, const String& name, const KURL& avatar)
- : Credential(PlatformLocalCredential::create(id, password, name, avatar))
- , m_formData(DOMFormData::create())
-{
- m_formData->append("username", id);
- m_formData->append("password", password);
-}
-
-const String& LocalCredential::password() const
-{
- return static_cast<PlatformLocalCredential*>(m_platformCredential.get())->password();
-}
-
-DEFINE_TRACE(LocalCredential)
-{
- visitor->trace(m_formData);
- Credential::trace(visitor);
-}
-
-} // namespace blink
« no previous file with comments | « Source/modules/credentialmanager/LocalCredential.h ('k') | Source/modules/credentialmanager/LocalCredential.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698