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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/about_page_handler.cc

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comments from Denis. Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/webui/options/chromeos/about_page_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/about_page_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual void UpdateStatusChanged(UpdateLibrary* object) { 71 virtual void UpdateStatusChanged(UpdateLibrary* object) {
72 page_handler_->UpdateStatus(object->status()); 72 page_handler_->UpdateStatus(object->status());
73 } 73 }
74 74
75 AboutPageHandler* page_handler_; 75 AboutPageHandler* page_handler_;
76 76
77 DISALLOW_COPY_AND_ASSIGN(UpdateObserver); 77 DISALLOW_COPY_AND_ASSIGN(UpdateObserver);
78 }; 78 };
79 79
80 AboutPageHandler::AboutPageHandler() 80 AboutPageHandler::AboutPageHandler()
81 : CrosOptionsPageUIHandler( 81 : progress_(-1),
82 new UserCrosSettingsProvider),
83 progress_(-1),
84 sticky_(false), 82 sticky_(false),
85 started_(false) 83 started_(false)
86 {} 84 {}
87 85
88 AboutPageHandler::~AboutPageHandler() { 86 AboutPageHandler::~AboutPageHandler() {
89 if (update_observer_.get()) { 87 if (update_observer_.get()) {
90 CrosLibrary::Get()->GetUpdateLibrary()-> 88 CrosLibrary::Get()->GetUpdateLibrary()->
91 RemoveObserver(update_observer_.get()); 89 RemoveObserver(update_observer_.get());
92 } 90 }
93 } 91 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { 410 if (CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) {
413 // If UpdateLibrary still has the observer, then the page handler is valid. 411 // If UpdateLibrary still has the observer, then the page handler is valid.
414 AboutPageHandler* handler = observer->page_handler(); 412 AboutPageHandler* handler = observer->page_handler();
415 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); 413 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel));
416 handler->web_ui_->CallJavascriptFunction( 414 handler->web_ui_->CallJavascriptFunction(
417 "AboutPage.updateSelectedOptionCallback", *channel_string); 415 "AboutPage.updateSelectedOptionCallback", *channel_string);
418 } 416 }
419 } 417 }
420 418
421 } // namespace chromeos 419 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698