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

Unified Diff: chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_api.cc

Issue 10690177: Renamed chrome_auth to cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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: chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_api.cc
===================================================================
--- chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_api.cc (revision 149229)
+++ chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_api.cc (working copy)
@@ -1,53 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/extensions/api/chrome_auth_private/chrome_auth_private_api.h"
-
-#include <string>
-#include "base/values.h"
-#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
-#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h"
-#include "chrome/browser/profiles/profile.h"
-
-namespace {
-
-bool test_mode = false;
-
-} // namespace
-
-namespace extensions {
-
-SetCloudPrintCredentialsFunction::SetCloudPrintCredentialsFunction() {
-}
-
-SetCloudPrintCredentialsFunction::~SetCloudPrintCredentialsFunction() {
-}
-
-bool SetCloudPrintCredentialsFunction::RunImpl() {
- std::string user_email;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &user_email));
- std::string robot_email;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &robot_email));
- std::string credentials;
- EXTENSION_FUNCTION_VALIDATE(args_->GetString(2, &credentials));
- if (test_mode) {
- std::string test_response = user_email;
- test_response.append(robot_email);
- test_response.append(credentials);
- SetResult(Value::CreateStringValue(test_response));
- } else {
- CloudPrintProxyServiceFactory::GetForProfile(profile_)->
- EnableForUserWithRobot(credentials, robot_email, user_email);
- }
- SendResponse(true);
- return true;
-}
-
-// static
-void SetCloudPrintCredentialsFunction::SetTestMode(bool test_mode_enabled) {
- test_mode = test_mode_enabled;
-}
-
-} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698