// 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.

#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_

#include <string>

#include "components/autofill/core/common/save_password_progress_logger.h"

class PasswordManagerClient;

namespace password_manager {

// This is the SavePasswordProgressLogger specialization for the browser code,
// where the PasswordManagerClient can be directly called.
class BrowserSavePasswordProgressLogger
    : public autofill::SavePasswordProgressLogger {
 public:
  explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client);
  virtual ~BrowserSavePasswordProgressLogger();

 protected:
  // autofill::SavePasswordProgressLogger:
  virtual void SendLog(const std::string& log) OVERRIDE;

 private:
  // The PasswordManagerClient to which logs can be sent for display. The client
  // must outlive this logger.
  PasswordManagerClient* const client_;

  DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger);
};

}  // namespace password_manager

#endif  // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_

// 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.

#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_

#include <string>

#include "components/autofill/core/common/save_password_progress_logger.h"

namespace password_manager {

class PasswordManagerClient;

// This is the SavePasswordProgressLogger specialization for the browser code,
// where the PasswordManagerClient can be directly called.
class BrowserSavePasswordProgressLogger
    : public autofill::SavePasswordProgressLogger {
 public:
  explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client);
  virtual ~BrowserSavePasswordProgressLogger();

 protected:
  // autofill::SavePasswordProgressLogger:
  virtual void SendLog(const std::string& log) OVERRIDE;

 private:
  // The PasswordManagerClient to which logs can be sent for display. The client
  // must outlive this logger.
  PasswordManagerClient* const client_;

  DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger);
};

}  // namespace password_manager

#endif  // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_

Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..."
Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..."

> Revert 262685 "Fix a forward declaration of PasswordManagerClient"
> 
> Compile still fails:
> http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20GTK%20Builder&number=2681
> ../../chrome/browser/ui/gtk/login_prompt_gtk.cc:70:7:error: 'PasswordManager' has not been declared
> 
> 
> > Fix a forward declaration of PasswordManagerClient
> > 
> > This went wrong with landing https://codereview.chromium.org/225093012 and https://codereview.chromium.org/216183008 too close from each other.
> > 
> > BUG=347927,348523
> > R=blundell@chromium.org
> > TBR=blundell@chromium.org
> > 
> > Review URL: https://codereview.chromium.org/230883002
> 
> TBR=vabr@chromium.org
> 
> Review URL: https://codereview.chromium.org/231043002

TBR=dmazzoni@google.com

Review URL: https://codereview.chromium.org/231033004

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@262700 0039d316-1c4b-4281-b951-d872f2087c98
