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

Side by Side Diff: chrome/browser/search_engines/template_url_model.cc

Issue 219042: linux: drop temp_scaffolding_stubs (Closed)
Patch Set: Created 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/search_engines/template_url_model.h" 5 #include "chrome/browser/search_engines/template_url_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 TemplateURL* modifiable_url = const_cast<TemplateURL*>(url); 502 TemplateURL* modifiable_url = const_cast<TemplateURL*>(url);
503 // Don't mark the url as edited, otherwise we won't be able to rev the 503 // Don't mark the url as edited, otherwise we won't be able to rev the
504 // templateurls we ship with. 504 // templateurls we ship with.
505 modifiable_url->set_show_in_default_list(true); 505 modifiable_url->set_show_in_default_list(true);
506 if (service_.get()) 506 if (service_.get())
507 service_.get()->UpdateKeyword(*url); 507 service_.get()->UpdateKeyword(*url);
508 508
509 const TemplateURLRef* url_ref = url->url(); 509 const TemplateURLRef* url_ref = url->url();
510 if (url_ref && url_ref->HasGoogleBaseURLs()) { 510 if (url_ref && url_ref->HasGoogleBaseURLs()) {
511 GoogleURLTracker::RequestServerCheck(); 511 GoogleURLTracker::RequestServerCheck();
512 #if defined(OS_WIN)
512 RLZTracker::RecordProductEvent(RLZTracker::CHROME, 513 RLZTracker::RecordProductEvent(RLZTracker::CHROME,
513 RLZTracker::CHROME_OMNIBOX, 514 RLZTracker::CHROME_OMNIBOX,
514 RLZTracker::SET_TO_GOOGLE); 515 RLZTracker::SET_TO_GOOGLE);
516 #endif
515 } 517 }
516 } 518 }
517 519
518 SaveDefaultSearchProviderToPrefs(url); 520 SaveDefaultSearchProviderToPrefs(url);
519 521
520 if (service_.get()) 522 if (service_.get())
521 service_->SetDefaultSearchProvider(url); 523 service_->SetDefaultSearchProvider(url);
522 524
523 if (loaded_) { 525 if (loaded_) {
524 FOR_EACH_OBSERVER(TemplateURLModelObserver, model_observers_, 526 FOR_EACH_OBSERVER(TemplateURLModelObserver, model_observers_,
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 AddToMaps(t_url); 1003 AddToMaps(t_url);
1002 something_changed = true; 1004 something_changed = true;
1003 } 1005 }
1004 } 1006 }
1005 1007
1006 if (something_changed && loaded_) { 1008 if (something_changed && loaded_) {
1007 FOR_EACH_OBSERVER(TemplateURLModelObserver, model_observers_, 1009 FOR_EACH_OBSERVER(TemplateURLModelObserver, model_observers_,
1008 OnTemplateURLModelChanged()); 1010 OnTemplateURLModelChanged());
1009 } 1011 }
1010 } 1012 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698