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

Side by Side Diff: components/proximity_auth/webui/proximity_auth_webui_handler.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/proximity_auth/webui/proximity_auth_webui_handler.h" 5 #include "components/proximity_auth/webui/proximity_auth_webui_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base64url.h" 10 #include "base/base64url.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return; 361 return;
362 } 362 }
363 } 363 }
364 364
365 PA_LOG(ERROR) << "Unlock key (" << b64_public_key << ") not found"; 365 PA_LOG(ERROR) << "Unlock key (" << b64_public_key << ") not found";
366 } 366 }
367 367
368 void ProximityAuthWebUIHandler::OnCryptAuthClientError( 368 void ProximityAuthWebUIHandler::OnCryptAuthClientError(
369 const std::string& error_message) { 369 const std::string& error_message) {
370 PA_LOG(WARNING) << "CryptAuth request failed: " << error_message; 370 PA_LOG(WARNING) << "CryptAuth request failed: " << error_message;
371 base::StringValue error_string(error_message); 371 base::Value error_string(error_message);
372 web_ui()->CallJavascriptFunctionUnsafe("CryptAuthInterface.onError", 372 web_ui()->CallJavascriptFunctionUnsafe("CryptAuthInterface.onError",
373 error_string); 373 error_string);
374 } 374 }
375 375
376 void ProximityAuthWebUIHandler::OnEasyUnlockToggled( 376 void ProximityAuthWebUIHandler::OnEasyUnlockToggled(
377 const cryptauth::ToggleEasyUnlockResponse& response) { 377 const cryptauth::ToggleEasyUnlockResponse& response) {
378 web_ui()->CallJavascriptFunctionUnsafe( 378 web_ui()->CallJavascriptFunctionUnsafe(
379 "CryptAuthInterface.onUnlockKeyToggled"); 379 "CryptAuthInterface.onUnlockKeyToggled");
380 // TODO(tengs): Update the local state to reflect the toggle. 380 // TODO(tengs): Update the local state to reflect the toggle.
381 } 381 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 << "\n trust_agent_state: " 610 << "\n trust_agent_state: "
611 << static_cast<int>(status_update.trust_agent_state); 611 << static_cast<int>(status_update.trust_agent_state);
612 612
613 last_remote_status_update_.reset(new RemoteStatusUpdate(status_update)); 613 last_remote_status_update_.reset(new RemoteStatusUpdate(status_update));
614 std::unique_ptr<base::ListValue> unlock_keys = GetUnlockKeysList(); 614 std::unique_ptr<base::ListValue> unlock_keys = GetUnlockKeysList();
615 web_ui()->CallJavascriptFunctionUnsafe( 615 web_ui()->CallJavascriptFunctionUnsafe(
616 "LocalStateInterface.onUnlockKeysChanged", *unlock_keys); 616 "LocalStateInterface.onUnlockKeysChanged", *unlock_keys);
617 } 617 }
618 618
619 } // namespace proximity_auth 619 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698