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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 10808068: Store ChromeToMobile device list and timestamp prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add GetMobiles ownership/lifetime comment. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 5 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 !toolbar_model_->input_in_progress() && 724 !toolbar_model_->input_in_progress() &&
725 edit_bookmarks_enabled_.GetValue(); 725 edit_bookmarks_enabled_.GetValue();
726 } 726 }
727 727
728 void LocationBarViewMac::UpdateChromeToMobileEnabled() { 728 void LocationBarViewMac::UpdateChromeToMobileEnabled() {
729 if (!chrome_to_mobile_decoration_.get()) 729 if (!chrome_to_mobile_decoration_.get())
730 return; 730 return;
731 731
732 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled()); 732 DCHECK(ChromeToMobileService::IsChromeToMobileEnabled());
733 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() && 733 bool enabled = [field_ isEditable] && !toolbar_model_->input_in_progress() &&
734 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasDevices(); 734 ChromeToMobileServiceFactory::GetForProfile(profile_)->HasMobiles();
735 chrome_to_mobile_decoration_->SetVisible(enabled); 735 chrome_to_mobile_decoration_->SetVisible(enabled);
736 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled); 736 command_updater_->UpdateCommandEnabled(IDC_CHROME_TO_MOBILE_PAGE, enabled);
737 } 737 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698