Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2010 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 <string>

#include "chrome/browser/net/url_fetcher.h"

class GURL;

namespace chromeos {

// The success code specified by the HTTP spec.
extern const int kHttpSuccess;

class AuthResponseHandler {
  AuthResponseHandler() {}
  virtual ~AuthResponseHandler() {}

  // True if this object can handle responses from |url|, false otherwise.
  virtual bool CanHandle(const GURL& url) = 0;

  // Caller takes ownership of return value.
  // Takes in |to_process|, creates an appropriate URLFetcher to handle
  // the next step, sets |catcher| to get called back when that fetcher is done.
  // Starts the fetch and returns the fetcher, so the the caller can handle
  // the object lifetime.
  virtual URLFetcher* Handle(const std::string& to_process,
                             URLFetcher::Delegate* catcher) = 0;

  // The URLs for different calls in the Google Accounts programmatic login API.
  static const char kClientLoginUrl[];
  static const char kIssueAuthTokenUrl[];
  static const char kTokenAuthUrl[];

}  // namespace chromeos


Generated by  Doxygen 1.6.0   Back to index