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

Unified Diff: chrome/browser/ui/cocoa/infobars/save_password_infobar_controller.mm

Issue 1978563002: Stop compiling password infobar code on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up cocoa Created 4 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: chrome/browser/ui/cocoa/infobars/save_password_infobar_controller.mm
diff --git a/chrome/browser/ui/cocoa/infobars/save_password_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/save_password_infobar_controller.mm
deleted file mode 100644
index c3ca11f3ae016f71d7b7aa298727f24d6ae7e963..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/infobars/save_password_infobar_controller.mm
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2015 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 <utility>
-
-#include "chrome/browser/password_manager/save_password_infobar_delegate.h"
-#include "chrome/browser/ui/chrome_style.h"
-#include "chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.h"
-#include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
-#include "components/infobars/core/infobar.h"
-#include "skia/ext/skia_utils_mac.h"
-#include "ui/base/cocoa/controls/hyperlink_text_view.h"
-
-@interface SavePasswordInfobarController : ConfirmInfoBarController
-@end
-
-@implementation SavePasswordInfobarController
-
-- (void)addAdditionalControls {
- [super addAdditionalControls];
- // Set the link inside the message.
- SavePasswordInfoBarDelegate* delegate =
- static_cast<SavePasswordInfoBarDelegate*>([self delegate]);
- gfx::Range linkRange = delegate->message_link_range();
- if (!linkRange.is_empty()) {
- NSColor* linkColor =
- skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor());
- HyperlinkTextView* view = (HyperlinkTextView*)label_.get();
- [view addLinkRange:linkRange.ToNSRange() withURL:nil linkColor:linkColor];
- }
-}
-
-std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
- std::unique_ptr<SavePasswordInfoBarDelegate> delegate) {
- std::unique_ptr<InfoBarCocoa> infobar(new InfoBarCocoa(std::move(delegate)));
- base::scoped_nsobject<SavePasswordInfobarController> controller(
- [[SavePasswordInfobarController alloc] initWithInfoBar:infobar.get()]);
- infobar->set_controller(controller);
- return std::move(infobar);
-}
-
-@end
« no previous file with comments | « chrome/browser/password_manager/password_manager_test_base.cc ('k') | chrome/browser/ui/views/infobars/legacy_infobars_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698