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

Side by Side Diff: chrome/browser/ui/search/search_model.cc

Issue 2888553002: Instant: small cleanups (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
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 #include "chrome/browser/ui/search/search_model.h" 5 #include "chrome/browser/ui/search/search_model.h"
6 6
7 #include "chrome/browser/ui/search/search_model_observer.h" 7 #include "chrome/browser/ui/search/search_model_observer.h"
8 #include "components/search/search.h" 8 #include "components/search/search.h"
9 9
10 SearchModel::State::State() : instant_support(INSTANT_SUPPORT_UNKNOWN) {} 10 SearchModel::State::State() : instant_support(INSTANT_SUPPORT_NO) {}
11 11
12 SearchModel::State::State(const SearchMode& mode, 12 SearchModel::State::State(const SearchMode& mode,
13 InstantSupportState instant_support) 13 InstantSupportState instant_support)
14 : mode(mode), instant_support(instant_support) {} 14 : mode(mode), instant_support(instant_support) {}
15 15
16 bool SearchModel::State::operator==(const State& rhs) const { 16 bool SearchModel::State::operator==(const State& rhs) const {
17 return mode == rhs.mode && instant_support == rhs.instant_support; 17 return mode == rhs.mode && instant_support == rhs.instant_support;
18 } 18 }
19 19
20 SearchModel::SearchModel() { 20 SearchModel::SearchModel() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 observer.ModelChanged(old_state, state_); 67 observer.ModelChanged(old_state, state_);
68 } 68 }
69 69
70 void SearchModel::AddObserver(SearchModelObserver* observer) { 70 void SearchModel::AddObserver(SearchModelObserver* observer) {
71 observers_.AddObserver(observer); 71 observers_.AddObserver(observer);
72 } 72 }
73 73
74 void SearchModel::RemoveObserver(SearchModelObserver* observer) { 74 void SearchModel::RemoveObserver(SearchModelObserver* observer) {
75 observers_.RemoveObserver(observer); 75 observers_.RemoveObserver(observer);
76 } 76 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_model.h ('k') | chrome/browser/ui/search/search_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698