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

Side by Side Diff: chrome/browser/android/preferences/website_preference_bridge.cc

Issue 2624583002: Remove redundant c_str() calls. (Closed)
Patch Set: Revert some changes Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/preferences/website_preference_bridge.h" 5 #include "chrome/browser/android/preferences/website_preference_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // This will result in this class getting deleted. 550 // This will result in this class getting deleted.
551 Release(); 551 Release();
552 } 552 }
553 553
554 void RecursivelyFindSiteAndDelete(CookieTreeNode* node) { 554 void RecursivelyFindSiteAndDelete(CookieTreeNode* node) {
555 CookieTreeNode::DetailedInfo info = node->GetDetailedInfo(); 555 CookieTreeNode::DetailedInfo info = node->GetDetailedInfo();
556 for (int i = node->child_count(); i > 0; --i) 556 for (int i = node->child_count(); i > 0; --i)
557 RecursivelyFindSiteAndDelete(node->GetChild(i - 1)); 557 RecursivelyFindSiteAndDelete(node->GetChild(i - 1));
558 558
559 if (info.node_type == CookieTreeNode::DetailedInfo::TYPE_COOKIE && 559 if (info.node_type == CookieTreeNode::DetailedInfo::TYPE_COOKIE &&
560 info.cookie && 560 info.cookie && domain_.DomainIs(info.cookie->Domain()))
561 domain_.DomainIs(info.cookie->Domain().c_str()))
562 cookies_tree_model_->DeleteCookieNode(node); 561 cookies_tree_model_->DeleteCookieNode(node);
563 } 562 }
564 563
565 private: 564 private:
566 friend class base::RefCountedThreadSafe<SiteDataDeleteHelper>; 565 friend class base::RefCountedThreadSafe<SiteDataDeleteHelper>;
567 566
568 ~SiteDataDeleteHelper() override {} 567 ~SiteDataDeleteHelper() override {}
569 568
570 Profile* profile_; 569 Profile* profile_;
571 570
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 SearchGeolocationService* search_helper = 806 SearchGeolocationService* search_helper =
808 SearchGeolocationService::Factory::GetForBrowserContext( 807 SearchGeolocationService::Factory::GetForBrowserContext(
809 GetActiveUserProfile(false /* is_incognito */)); 808 GetActiveUserProfile(false /* is_incognito */));
810 return search_helper->SetDSEGeolocationSetting(setting); 809 return search_helper->SetDSEGeolocationSetting(setting);
811 } 810 }
812 811
813 // Register native methods 812 // Register native methods
814 bool RegisterWebsitePreferenceBridge(JNIEnv* env) { 813 bool RegisterWebsitePreferenceBridge(JNIEnv* env) {
815 return RegisterNativesImpl(env); 814 return RegisterNativesImpl(env);
816 } 815 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698